if ($submit) {
$sql = "UPDATE employees SET first='$first',last='$last', address='$address',position='$position' WHERE id=$id";
$result = mysql_query($sql);
echo "谢谢!数据更改完成n"; phperz.com
} else {
// 查询数据库
$sql = "SELECT * FROM employees WHERE id=$id";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result); www.phperz.com
?>
<form method="post" action="<?php echo $PATH_INFO?>">
<input type=hidden name="id" value="<?php echo $myrow["id"] ?>"> www~phperz~com
名:<input type="Text" name="first" value="<?php echo $myrow["first"] ?>"><br> 姓:<input type="Text" name="last" value="<?php echo www~phperz~com $myrow["last"] ?>"><br> 住址:<input type
|