// 如果不是修改状态,则显示员工列表
$result = mysql_query("SELECT * FROM employees",$db);
while ($myrow = mysql_fetch_array($result)) {
printf("<a href="%s?id=%s">%s %s</a> n", www.phperz.com $PATH_INFO, $myrow["id"], $myrow["first"], $myrow["last"]);
printf("<a href="%s?id=%s&delete=yes">(DELETE)</a>< www.phperz.com br>", $PATH_INFO, $myrow["id"]);
}
}
?>
<P>
<a href="<?php echo $PATH_INFO?>">ADD A RECORD</a> www.phperz.com
<P>
<form method="post" action="<?php echo $PATH_INFO?>">
<?php
if ($id) {
// 我们是在编辑修改状态,因些选择一条记录
$sql = "SELECT * FROM employees WHERE id=$id"
|