<?php
session_start();                      
$username=$_SESSION['username'] ?? null;
$password=$_SESSION['password'] ?? null;
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){
	$log_no = $_POST['log_no'] ?? null;
	$chn = $_POST['chn'] ?? null;
	$act_rem = $_POST['act_rem'] ?? null;
	$exchngstrw = $_POST['exchngstrw'] ?? null;
	$nosoocyt = $_POST['nosoocyt'] ?? null;
	$contnrno = $_POST['contnrno'] ?? null;
	$canistrno = $_POST['canistrno'] ?? null;
	$goblet = $_POST['goblet'] ?? null;
	$viscosity = $_POST['viscosity'] ?? null;
	$cryocolor = $_POST['cryocolor'] ?? null;
	$frzngtrms = $_POST['frzngtrms'] ?? null;
	$result = mysqli_query($conn, "UPDATE actvty_trans_frzng_oocyt SET term_date='$frzngtrms', exchngstrw='$exchngstrw', nosoocyt='$nosoocyt', contnrno='$contnrno', canistrno='$canistrno', goblet='$goblet', viscotube='$viscosity', cryocolor='$cryocolor', remarks='$act_rem' WHERE log_no='$log_no' limit 1");
     echo "<b>Record updated successfully!<br>You'll be redirected to patient list page now";
     echo "<meta http-equiv=Refresh content=2;url=gend_cycle_select.php?chn=$chn>";
}else{
echo "User name or password not matched, try login again";
}
?>