ohctech_p8/save_collector.php
Dushant Mali 899fb3e65a Upgrade 7 to 8
Upgrade 7 to 8
2024-11-02 18:03:13 +05:30

32 lines
972 B
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,'Disposal Agency save_collector.php','SAVE','save_collector.php');
$collector_id = $_POST['collector_id'];
$collector_name =$_POST['collector_name'];
$ohc_type_id = $_POST['ohc_type_id'];
if(!empty($collector_id)){
$inq="update";
$endq=" where collector_id ='".$collector_id."' ";
}
else {
$inq = "insert into ";
$endq="";
}
$query = $inq." bio_wast_collector set collector_name = '$collector_name',ohc_type_id = '$ohc_type_id',modified_by = '".$_SESSION['user_id']."' ".$endq ;
if (!$result = @mysqli_query($conn,$query)) {
die(mysqli_error($conn));
}
?>