20 lines
567 B
PHP
20 lines
567 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)) {
|
|
if ($resultc = @mysqli_query($conn, $queryc)) {
|
|
echo json_encode("SUCCESS");
|
|
}
|
|
} else {
|
|
error_log("error in checkup form delete query. " . mysqli_error($conn));
|
|
echo json_encode("FAILURE");
|
|
}
|
|
}
|