更新操作不起作用,请告诉我此代码中有任何错误。我的表格有3个不同的字段,分别是姓名,手机,电子邮件。我想更新这个。请告诉我我误会了...
<?php
session_start();
$name = $_SESSION['mobile'];
$conn = mysqli_connect("localhost","root","","hoysalat_temple");
if(isset($_SESSION['newid']))
{
// header("location:index.php");
}
else
{
header("location:../index.php");
}
if($_POST["update"]) {
$name_save = $_POST['name'];
$mobile_save = $_POST['mobile'];
$email_save = $_POST['email'];
$update="update temp_web_users set name='".$name_save."', mobile='".$mobile_save."', email='".$email_save."' where mobile='".$name."'";
mysqli_query($con, $update) or die(mysqli_error());
$status = "Record Updated Successfully. </br></br>
}
?>