<?php
$errmsg='';
$sucmsg='';

include('database.php');

//GET DETAILS FROM DB
if(isset($_GET["i"])){
	$applicant_id=$_GET["i"]; 
	$q = "Select * from prob_application where id=$applicant_id limit 1";
    $qry=mysqli_query($con, $q);
    $row=mysqli_fetch_assoc($qry);
    extract($row);
	//print_r($row);
	$myAppID = $id;
	$applicant_id = $id;
	$applicant_no = $memberNo;
	
	$q = "update prob_application set status='Submitted' where id=$applicant_id limit 1";
    $qry=mysqli_query($con, $q);
    
	if($qry){ echo '<script>alert("Form Submitted Successfully"); history.back(); </script>';}else{echo '<script>alert("Invalid Token"); history.back(); </script>';}
	
}else{
	echo '<script>alert("Invalid Token"); history.back(); </script>';
}
    
?>