30 lines
1.1 KiB
PHP
30 lines
1.1 KiB
PHP
<?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,'Medical Form','SAVE','save_medical_form.php');
|
|
$medical_form_id = $_POST['medical_form_id'];
|
|
$medical_form_name =$_POST['medical_form_name'];
|
|
$is_qty_fixed = $_POST['is_qty_fixed'];
|
|
|
|
$medical_form_code = $_POST['medical_form_code'];
|
|
if(!empty($medical_form_id)){
|
|
$query = "update medicine_form set form_name = '$medical_form_name', form_code = '$medical_form_code',modified_by = '".$_SESSION['user_id']."' ,is_qty_fixed='".$is_qty_fixed."' where form_id =
|
|
'".$medical_form_id."' ";
|
|
}
|
|
else {
|
|
$query = "insert into medicine_form(form_name,form_code,modified_by,is_qty_fixed)
|
|
values ('$medical_form_name','$medical_form_code','".$_SESSION['user_id']."','$is_qty_fixed' ); ";
|
|
}
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
?>
|