Pages/Shared/_LoginPartial.cshtml
查询失败,并且未在phpmyadmin中更新。我看不出有什么问题,也没有给出错误信息。
答案 0 :(得分:2)
我不确定这是否是您的唯一问题,但您的query
// change this
$query = "UPDATE post";
$query .= "SET title = $title, content=$content";
$query .= "WHERE id= $id";
// to this
$query = "UPDATE post ";
$query .= "SET title = '$title', content='$content' ";
$query .= "WHERE id = '$id'";