<?php
	session_start();
	include"../../connect/db.php"; 
 ?>  
<?php
	csrf_verify();
	$pin = mysqli_real_escape_string($con,$_POST['pin2']);
	$email = $_SESSION['chap'];

	$sql = mysqli_query($con,"SELECT pin,status FROM users WHERE email = '$email' ");

		$row = mysqli_fetch_assoc($sql);

		if( $pin == $row['pin'] ){
			
		    echo "success";					

		}
		else{
			echo "Wrong Details";
		}
?>		