28 lines
1.1 KiB
PHP
28 lines
1.1 KiB
PHP
|
<?php
|
||
|
include('includes/config/config.php');
|
||
|
include('includes/functions.php');
|
||
|
|
||
|
|
||
|
$query_initial="";
|
||
|
$endquery="";
|
||
|
begin();
|
||
|
// if(!empty($id)){
|
||
|
// $query_initial="update ";
|
||
|
// $endquery=" where id = '".$id."' ";
|
||
|
// }else{
|
||
|
$query_initial="insert into ";
|
||
|
//}
|
||
|
|
||
|
|
||
|
$query=$query_initial." form_17 set medical_exam_id='".$_REQUEST['medical_exam_id17']."', date_leaving=STR_TO_DATE('".$_POST['date_leaving']."', '%Y-%m-%d'),reason_for_discharge='".$_POST['reason_for_discharge']."',signs_symptoms='".$_POST['signs_symptoms']."', nature_tests='".$_POST['nature_tests']."',period_temp_withdrawal='".$_POST['period_temp_withdrawal']."',reason_withdrawal='".$_POST['reason_withdrawal']."',date_unfit=STR_TO_DATE('".$_POST['date_unfit']."', '%Y-%m-%d'),date_fitness=STR_TO_DATE('".$_POST['date_fitness']."', '%Y-%m-%d') ".$endquery;
|
||
|
|
||
|
error_log("ehwifhew".$query);
|
||
|
|
||
|
if (!$result = mysqli_query($conn,$query)) {
|
||
|
rollback();
|
||
|
exit(mysqli_error($conn));
|
||
|
}
|
||
|
|
||
|
commit();
|
||
|
?>
|
||
|
|