<?php
require_once __DIR__ . '/db_config.php';
$response = array();
  
  
if ( isset($_POST['emailid'])) {
    
    
    $emailid= $_POST['emailid'];
    $signout= "yes";
    $con = mysqli_connect(DB_SERVER, DB_USER, DB_PASSWORD,DB_DATABASE) or die(mysql_error());

    $query ="UPDATE signupdetails SET signout = '$signout' WHERE emailid = '$emailid' ";
    $result=mysqli_query($con,$query);

    if ($result) {
        $response["s"] = 1;
    } else {
       $response["s"] = 0;
    }
} else {
    $response["s"] = 2;
}
    echo json_encode($response);

?>