<?php

include '../db_connect.php';

$userid = $_POST['userid'];
$token = $_POST['token'];
$key = $_POST['key'];

$security_key = decrypData($key);

if ( $security_key== 'Jobayer121415'){
	
	$con = dbConnect();
	
    $sql1 = "UPDATE singup_table SET token = '$token' WHERE id = '$userid'";
    $result1 = mysqli_query ($con, $sql1);
    
}

function decrypData ($text){
      
	$encoded = $text;
	$decoded = base64_decode($encoded);
    $decrypted = openssl_decrypt($decoded, 'AES-128-ECB', '0175526800812345', OPENSSL_RAW_DATA);
    return $decrypted;
	
}


?>