<?php
session_start();
require_once('mysqli_con.php');



if(isset($_POST['update'])){
     $first_name = $_POST['fname'];
     $last_name = $_POST['lname'];
     $phone = $_POST['phone'];
     $address = $_POST['address'];
     $buyerid = $_SESSION['buyer_id'];


     $sqlUpdate = "UPDATE buyer SET
     first_name = '$first_name',
     last_name = '$last_name',
     phone = '$phone',
     address = '$address' WHERE buyer_id = '$buyerid'  ";
     mysqli_query($conn, $sqlUpdate);

     $_SESSION ['first_name'] = "$first_name";
     $_SESSION ['last_name'] = "$last_name";
     $_SESSION ['phone'] = "$phone";
     $_SESSION ['address'] = "$address";
}
 ?>
 <?php
   echo "Update Succesull"?>
   <meta http-equiv="refresh" content="2; URL='updateProfile.php'" > <?php


?>
