<?php
session_start();                      
$username=$_SESSION['username'] ?? '';
$password=$_SESSION['password'] ?? '';
$question=$_POST['finalwtns'] ?? '';
$deptmnt="3";
$chn=$_POST['chn'] ?? '';
$chn_cycle=$_POST['chn_cycle'] ?? '';
$witns_one=$_POST['witns_one'] ?? '';
$witns_two=$_POST['witns_two'] ?? '';
$chn_don=$_POST['chn_don'] ?? '';
$chn_semen=$_POST['chn_semen'] ?? '';
$p_mark=$_POST['pmark'] ?? '';
include 'dbcon.php'; 
$password=md5($password);
$sql = mysqli_query($conn, "SELECT * FROM matcher_usermst WHERE nif_usr='$username' AND nif_pass='$password' AND act_vate='1'");
$login_check = mysqli_num_rows($sql);
	if($login_check > 0){
			$sql = mysqli_query($conn, "INSERT INTO matcher_trans (reslt_dt, ent_by, chn, chn_cycle, witns_one, witns_two, chn_don, chn_semen, finalwitnsd, p_mark, witns1pnt)
			VALUES(now(), '$username', '$chn', '$chn_cycle', '$witns_one', '$witns_two', '$chn_don','$chn_semen','$question', '$p_mark','0')") or die (mysqli_error($conn));
    }else{
	}
?>
