Mysql UPDATE Statement

0

There may be a requirement where the existing data in a MySQL table needs to be modified. You can do so by using the SQL UPDATE command. This will modify any field value of any MySQL table.

Code

$modelno  = $_POST['model_number'];
$car_id  = $_POST['car_id'];
$seat = $_POST['seat'];
$serviceid = implode(",",$_POST['service_id']);
$sql = "UPDATE iosr_car_detail SET make_of_car ='".$_POST['make_of_car']."', make_of_series ='".$_POST['make_of_series']."', model_no ='".$modelno."', seat = '".$seat."',modify_date = '".date('Y-m-d H:i:s')."' WHERE car_id = '".$car_id."'";
$result = mysqli_query($con,$sql);
if($result)
{
   header('location:car_list.php'); 
}
else
{
    $message = 'Due to Some Error!!'; 
}