I am using the following to get details from my database,
Is it possible to add an auto number column at the beginning of each line
PHP Code:
<?php
$con = mysql_connect("localhost","user","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("database name", $con);
$result = mysql_query("SELECT * FROM database name");
echo "<center>
<h1><b>Members</b></h1>
<table border='1'>
<tr>
<th>Created</th>
<th>Username</th>
<th>Name</th>
<th>Passphrase</th>
<th>Custom1</th>
</tr></center>" ;
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Created'] . "</td>";
echo "<td>" . $row['Username'] . "</td>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Passphrase'] . "</td>";
echo "<td>" . $row['Custom1'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
Bookmarks