Read data from database in php mysql
Reading data from database in php and mysql
<table >
<thead>
<tr>
<th>#</th>
<th>Centre</th>
<th> Address</th>
<th>Contact</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$query=mysqli_query($con,"Select id, CentreName,CentreAddress,CentreContact from tblcentres where Is_Active=1");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<th scope="row"><?php echo htmlentities($cnt);?></th>
<td><?php echo htmlentities($row['CentreName']);?></td>
<td><?php echo htmlentities($row['CentreAddress']);?></td>
<td><?php echo htmlentities($row['CentreContact']);?></td>
<td><a href="manage-centres.php?resid=<?php echo htmlentities($row['id']);?>&&action=restore"><i class="ion-arrow-return-right" title="Restore"></i></a>
<a href="manage-centres.php?parmdelid=<?php echo htmlentities($row['id']);?>&&action=parmdel" title="Delete forever"> <i class="fa fa-trash-o" style="color: #f05050"></i> </td>
</tr>
<?php
$cnt++;
} ?>
</tbody>
</table>
Comments
Post a Comment