25 lines
521 B
PHP
25 lines
521 B
PHP
|
<?php
|
||
|
include('includes/config/config.php');
|
||
|
$query="";
|
||
|
$id = $_REQUEST['ohc_type_id'];
|
||
|
error_log($id);
|
||
|
if(!empty($_REQUEST['ohc_type_id'])){
|
||
|
$query = "delete from checkup_form where checkup_id = '$id'";
|
||
|
$queryc = "delete from checkup_form_key_value where checkup_form_id = '$id'";
|
||
|
error_log($query);
|
||
|
|
||
|
if (!$result = @mysqli_query($conn,$query)) {
|
||
|
|
||
|
exit(mysqli_error($conn));
|
||
|
echo json_encode("FAILURE");
|
||
|
}else{
|
||
|
$result = @mysqli_query($conn,$queryc);
|
||
|
echo json_encode("SUCCESS");
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
?>
|