データベースからのレコードを入力するテーブルがあります。ビューボタンをクリックしたときにやりたいことは、行のIDを取得して、ユーザーの他の情報を呼び出すことができるようにすることですが、その方法がよくわかりません。これが私がテーブルを埋めた方法です。
<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>";
}
?>