我在“profile_server.php”中有以下代码,但没有任何内容写入数据库,我不知道为什么。我感谢您的帮助 :
if(isset($_POST['submit'])){
$id = $_SESSION['id']; // Retrieved from previous session
//Declaring variables
$country = mysqli_real_escape_string($db, $_POST['country']);
$province = mysqli_real_escape_string($db, $_POST['province']);
$city = mysqli_real_escape_string($db, $_POST['city']);
$sql_u_details = $db->prepare ("UPDATE user_details
SET (country, province, city)
VALUES (?, ?, ?)
WHERE id = ? ");
$sql_u_details->bind_param("ssss", $country, $province, $city, $id);
$sql_u_details->execute();
mysqli_query($db, $sql_u_details);
}
烙印99