28 lines
990 B
PHP
28 lines
990 B
PHP
<?php
|
|
include('includes/config/config.php');
|
|
include('log_entry.php');
|
|
$section_id= $_POST['section_id'];
|
|
$bu_id = $_POST['bu_id'];
|
|
$dept_id = $_POST['dept_name'];
|
|
$section_name =$_POST['section_name'];
|
|
$emp_id = $_POST['head_id'];
|
|
$head_email = $_POST['section_head_email'];
|
|
|
|
$head_name = $_POST['section_head_name'];
|
|
if(!empty($section_id)){
|
|
$query = "update section set section_id='$section_id',section_name = '$section_name',bu_id='$bu_id',dept_id='$dept_id',section_headname ='$head_name',section_head_email='$section_head_email',modified_by = '".$_SESSION['user_id']."' where section_id = '".$section_id."'";
|
|
|
|
error_log("sdcascd".$query);
|
|
}
|
|
else {
|
|
$query = "insert into section(section_name,bu_id,section_headname,dept_id,section_head_email,modified_by)
|
|
values ('$section_name','$bu_id','$head_name','$dept_id ','$head_email','".$_SESSION['user_id']."' )";
|
|
|
|
error_log("dcsfs".$query);
|
|
|
|
}
|
|
if (!$result = @mysqli_query($conn,$query)) {
|
|
exit(mysqli_error($conn));
|
|
}
|
|
?>
|