ESH/save_cylinder_questionnaire.php
2024-10-23 18:28:06 +05:30

33 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,'Oxygen Cylinder Questionnaire','SAVE','save_cylinder_questionnaire.php');
$question_id=$_POST['question_id'];
$question = $_POST['question'];
$question_local = $_POST['question_local'];
$query="";
if(!empty($question_id)){
$query = "update oxygen_cylinder_questionnaire set question='$question',question_local='$question_local' where question_id ='".$question_id."'";
}
else {
$query = "insert into oxygen_cylinder_questionnaire(question,question_local)
values ('$question','$question_local' )";
error_log('insert'.$query);
}
//echo $query;
if (!$result = @mysqli_query($conn,$query)) {
error_log("Failed to exuecuted Referral point:". mysqli_error($conn) . " Failing Query:". $query);
exit(mysqli_error($conn));
}
?>