<?php
session_start();                      
$username=$_SESSION['username'] ?? '';
$xid_x = $_GET['pat_chn'] ?? '';
$cyc_x = $_GET['cyc'] ?? '';

$xid_x = $_POST['pat_chn'] ?? '';
$cyc_x = $_POST['cyc'] ?? '';


$xproto = $xid_x.".".$cyc_x; 
include 'config.php';
$etprocedurelab = $_POST['etprocedurelab'] ?? '';
$etprocedurelab = stripslashes($etprocedurelab);
$result = mysqli_query($conn,   "UPDATE cycle_lst SET cycle_activt='2' WHERE chn_id like '%$cyc_x%' limit 1");
$sql = mysqli_query($conn, "INSERT INTO user_log (log_date, updt_strng, user_id, chn) VALUES(now(), '$lg_strng', '$username', '$xid_x')") or die (mysqli_error($conn));
echo "<b>Aspiration updated successfully!<br>You'll be redirected to patient page now";
echo "<meta http-equiv=Refresh content=1;url=gend_cycle_select.php?chn=$xid_x>";
?>