Breaking News

how to display data using php



View on YouTube
Code goes here:

<table border="1px">

<tr>

    <td>Id</td>

    <td>First Name</td>

    <td>Last Name</td>

    <td>Address</td>

    <td>Contact</td>

    </tr>

<?php

$dbconnect = mysqli_connect('localhost','root','','tutor');

$sql=mysqli_query($dbconnect, "select * from admission");

while($result=mysqli_fetch_assoc($sql)){



?>

<tr>

<td><?php echo $result['id'];?></td>

<td><?php echo $result['fname'];?></td>

<td><?php echo $result['lname'];?></td>

<td><?php echo $result['address'];?></td>

<td><?php echo $result['contact'];?></td>

</tr>

<?php

}



?>

</table>

No comments