This question already has an answer here:
- PHP parse/syntax errors; and how to solve them? 17 answers
- Warning: mysqli_error() expects exactly 1 parameter, 0 given error [closed] 3 answers
- How to display errors for my MySQLi query? [duplicate] 3 answers
- “Notice: Undefined variable”, “Notice: Undefined index”, and “Notice: Undefined offset” using PHP 28 answers
update operation not working please tell me there is any error in this code. I have the form with 3 different fields called name, mobile, email. I want to update this. Please tell me where i mistaken exactly...
<?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>
}
?>
</div>