<?php
mysql_connect("localhost","root","");
mysql_select_db("test1");
?>
<table width="400" border="1">
<tr>
<td>sl number</td>
<td>field_name </td>
<td>field_pass </td>
<td>field_address </td>
</tr>
<?php
$i=1;
$query="Select * from tablename ";
$RES=mysql_query($query);
while($ROW=mysql_fetch_array($RES))
{
?>
<tr>
<td><?php echo $i ?></td>
<td><?php echo $ROW[1]; ?></td>
<td><?php echo $ROW[2]; ?></td>
<td><?php echo $ROW[3]; ?></td>
</tr>
<?php
$i=$i+1;
}
?>
</table>
No comments:
Post a Comment