28 lines
647 B
PHP
28 lines
647 B
PHP
|
<?php
|
||
|
include('includes/config/config.php');
|
||
|
include ('includes/functions.php');
|
||
|
include ('log_entry.php');
|
||
|
$id = $_POST['id'];
|
||
|
$name = $_POST['indicationname'];
|
||
|
error_log ( "BRANCH ID=> " . $id . " NAME-> " . $name );
|
||
|
save_log($requestStr,'indication','UPDATE','edit_indication_list.php');
|
||
|
// error_reporting(E_ERROR | E_PARSE);
|
||
|
|
||
|
$query="";
|
||
|
if(!empty($id)){
|
||
|
$query="UPDATE `indication` SET `indication_name`='$name' WHERE `indication_id`='$id';";
|
||
|
error_log($query);
|
||
|
|
||
|
if (!$result = @mysqli_query($conn,$query)) {
|
||
|
|
||
|
exit(error_log(mysqli_error($conn)));
|
||
|
echo json_encode("FAILURE");
|
||
|
}else{
|
||
|
echo json_encode("SUCCESS");
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
?>
|