$Control_no = uniqid();
$q = "INSERT INTO `client_t` (`Control_no`, `Client_id`, `Fname`,
`Mname`, `Lname`, `Religion`,
`Citizenship`, `Address`, `E-mail`,
`Monthly_Income`, `Detained`, `Date_detained`,
`Age`, `Gender`, `Civil_Status`,
`Educ_attain`, `Language`, `Contact_no`,
`Spouse`)
VALUES ('$Control_no','','$_POST[Fname]',
'$_POST[Mname]','$_POST[Religion]','$_POST[Citizenship]',
'$_POST[Address]}','$_POST[Email]','$_POST[Monthly_Income]',
'$_POST[Detained]','$_POST[Date_Detained]','$_POST[Age]',
'$_POST[Gender]','$_POST[Civil_Status]','$_POST[Educ_Attain]',
'$_POST[Language]','$_POST[Contact_no]','$_POST[Spouse]')";
$r = mysqli_query($db,$q);
$Client_id = mysqli_insert_id();