I have a table that I fill with records from the database. What I want to do when the view button is clicked is to be able to get the ID of the row so that I can call on the other information of the user but I'm not quite sure how to do it. Here's how I filled the table.
<table border="1" cellpadding="5" cellspacing="2" width="600">
<tr>
<th>ID</th>
<th>Username</th>
<th>Email</th>
<th>Telephone</th>
<th>Date Registered</th>
<th>Member Details</th>
</tr>
<?php
require('db_connection.php');
$query="SELECT ID,Username,Email,Telephone,RegisterDate FROM Members";
$result=mysql_query($query) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
echo "</td><td>";
echo $row['ID'];
echo "</td><td>";
echo $row['Username'];
echo "</td><td>";
echo $row['Email'];
echo "</td><td>";
echo $row['Telephone'];
echo "</td><td>";
echo $row['RegisterDate'];
echo "</td><td>";
print '<center><input name="ViewBtn" type="submit" value="View" /></center>';
echo "</td></tr>";
}
?>