除了我想通过查询进入下一页以删除条目外,代码的每个部分都可以正常工作。td 的回显适用于 text ,我想将其用作链接。
<?php
$connect=mysql_connect("localhost","root","");
mysql_select_db("dbms_teacher",$connect);
$result=mysql_query("SELECT fname,lname,post,status FROM staffs");
echo "<table border=1>";
echo "<tr><td>First Name</td><td>Last Name</td><td>Post</td><td>Status</td><td>Edit /Delete</td></tr>";
while ($row=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['fname'] . "</td>";
echo "<td>" . $row['lname'] . "</td>";
echo "<td>" .$row['post']. "</td>";
echo "<td>". $row['status']. "</td>";
echo "<td> delete </td>"; //In this line, I want to hyperlink it to some other page
echo "</tr>";
}
mysql_close($connect);
echo "</table>";
?>