HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux ip-172-31-18-78 6.17.0-1017-aws #17~24.04.1-Ubuntu SMP Tue May 26 21:09:53 UTC 2026 aarch64
User: ubuntu (1000)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: /var/www/nclive/backend/verify_email_status.php
<?php
header("Access-Control-Allow-Origin: *");
header('Content-Type: application/json');
include "config.php";

// error_reporting(E_ALL);
// ini_set('display_errors',1);
// ini_set('display_startup_errors',1);
$refr = $_SERVER['HTTP_REFERER'];
if($refr!='')
{
    $json = file_get_contents('php://input');
	$data = json_decode($json);
    $email = $data->email;

    $curDate = date('y-m-d h:i:s');

    $checkExistQuery = "select count(id) as total from sp_subscription where email_id='$email'";
    $sqlExist=$db->prepare($checkExistQuery);
    $sqlExist->execute();
    $rowExist=$sqlExist->fetch();
    $exist = $rowExist['total'];

    if($exist!=0)
    {
        $updateEmail = "UPDATE sp_subscription set status='1', verified='1', verify_date='$curDate' where email_id='$email'";
        $sql=$db->prepare($updateEmail);
        if($sql->execute())
        {
            $resultArrayData[]=array("status"=>1, "message"=>'Your email id is successfully verified');
        }
    }
    else
    {
        $resultArrayData[]=array("status"=>0, "message"=>'something went wrong');
    }

}

else
{
	$resultArrayData[] = array("status"=>"error","message"=>"unauthorized access");
}

echo json_encode($resultArrayData);