<?php
require("connected.php");


//print_r($_POST);



if(isset($_POST["angle"]))
{
    
    //check if matric number exist
    
   
    
    
    
    
    if(!isset($_POST["image_data"])||!isset($_POST["jambno"] )){
        
        echo "Not receiving from form";
    }
$captured=$_POST["image_data"];
$jambno=$_POST["jambno"];


//$metricno=$_POST["metricno"];

mysqli_query($connect,"UPDATE records SET `passport`='$captured',`verify_status`='yes' WHERE `jambno`='$jambno'");

if(mysqli_affected_rows($connect))
{
    header("location:preview.php?candidate=".$jambno);
}
}






























?>