ESH/save_injury_part.php

29 lines
1.0 KiB
PHP
Raw Normal View History

2024-10-23 18:28:06 +05:30
<?php
include('includes/config/config.php');
include ('includes/functions.php');
include ('log_entry.php');
error_log ( "Start Printing Request Attributes" );
$requestStr="";
foreach ( $_REQUEST as $key => $value ) {
$requestStr.=$key . " : " . $value . "\n";
error_log ( $key . " : " . $value . "<br />\r\n" );
}
error_log ( "End Printing Request Attributes" );
save_log($requestStr,'Injury Part','SAVE','save_injury_part.php');
$injury_id = $_POST['injury_id'];
$injury_name =$_POST['injury_name'];
$injury_desc = $_POST['injury_desc'];
$injury_code = $_POST['injury_code'];
if(!empty($injury_id)){
$query = "update injury_part set inj_name = '$injury_name', inj_desc = '$injury_desc', inj_code = '$injury_code',modified_by = '".$_SESSION['user_id']."' where inj_id =
'".$injury_id."' ";
}
else {
$query = "insert into injury_part(inj_name,inj_desc,inj_code,modified_by)
values ('$injury_name','$injury_desc','$injury_code','".$_SESSION['user_id']."' ); ";
}
if (!$result = @mysqli_query($conn,$query)) {
exit(mysqli_error($conn));
}
?>