每次我点击提交按钮以在我的网页中处理此代码时,它都会转到“找不到对象(404 错误)”页面。它发生在我的一些脚本中,我不知道问题的根源是我的本地主机(Xampp)还是我的代码。
if (isset($_POST['submit']))
{
require "dbc.php"; //Connection to database
//the textfield input to be saved
$name = mysql_real_escape_string($_POST['assign_id']);
$id = mysql_real_escape_string($_POST['id']);
//the mysql query to process the textfield input
$query = mysql_query("UPDATE users SET docID='$assign_id' WHERE id='$id'");
//normal statement to let the user know that the changes have been made.
echo "Doctor ID Successfully Assigned for Patient ID : $name ";
echo "<p>Refresh page to view changes.</p>";
}