Search This Blog

Tuesday, 20 January 2015

Retrieve data from database in PHP.

<table width="100%" border="1" cellspacing="1" cellpadding="0">

<tr>

<td>Name</td>

<td>Email</td>

</tr>

<?php
$rec=mysql_query("select * from employe");
while($row=mysql_fetch_array($rec))
{
?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['email']; ?></td>
</tr>
<?php }?>
</table>

No comments:

Post a Comment