I want to display mysql database data in table format using php. my code is not working. I have data in table and connection is also made. However only the column title gets displayed, and not the database data.
<html>
<body>
<table style="width:300px">
<tr> <td>Empno</td> <td>Ename</td> <td>address</td> <td>City</td> </tr>
<?php include("conn.php");
$res=mysql_query("select * from info");
$res=mysql_query($res);
$i=1;
while($row=mysql_fetch_array($res)) { ?>
<tr> <td><?php echo ($row['empno']);?></td>
<td><?php echo ($row['ename']);?></td>
<td><?php echo ($row['address']);?></td>
<td><?php echo ($row['city']);?></td> </tr>
<?php $i++; } ?> </table>
</body>
</html>