<?php

session_start(); 
    $u_uname = '';
    if (isset($_COOKIE['auth_token']))
    {
        $u_uname = $_COOKIE['auth_token'];
    }else{
        header("location:../login.php");
    }
    
    
    include('../include/connection.php');

    $full_name = $_POST['full_name'];
    $email = $_POST['email'];
    $mobile_no = $_POST['mobile_no'];
    $whatsapp = $_POST['whatsapp'];
    $address = $_POST['address'];
    $company_name = $_POST['company_name'];
    $dob = $_POST['dob'];
    $gender = $_POST['gender'];
    $blocking_status = $_POST['blockStatus'];

    $id = $_GET['id'];

    $sql = "UPDATE `clientRegister` SET `full_name`='$full_name',`email`='$email',`mobile_no`='$mobile_no', `whatsapp`='$whatsapp',`address`='$address',`company_name`='$company_name', `dob`='$dob',`gender`='$gender',`blocking_status`='$blocking_status' WHERE id=$id";
    
    $result = mysqli_query($link,$sql);
    
    if($result){
        header('Location:../allClients.php?status=1');
    }
    
?>