;學生管理系統
//連結資料庫
header("content-type:text/html;charset=utf8");
$conn=mysqli_connect("localhost","root","root","edu");
mysqli_set_charset($conn, "utf8");
$id=$_GET['id'];
//執行sql
$sql_select = "select * from stu where id='id'";
$stmt = mysqli_query($conn,$sql_select);
//判斷
if ($stmt > 0)
{
$stu = mysqli_fetch_assoc($stmt); // 解析資料
# }else{
die("沒有這個id:{$_GET['id']}");
}
?>
修改學生資料
< /body>
###########################]#####>########################s>##n>###############################h>#n #####
遇到相同問題,能修改成功就是提示:
Notice: Object of class mysqli_result could not be converted to int in E:\phpStudy\WWW\stu\edit.php on line 19
你用post 發值 用get接收 我估計不好收到
連結資料庫有毛病唄