25 lines
755 B
PHP
25 lines
755 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, 'Habit', 'DELETE', 'habit_master.php');
|
|
$query = "";
|
|
if (!empty($_REQUEST['flex_habit_id'])) {
|
|
$query = " delete from habits where habit_id = '" . $_REQUEST['flex_habit_id'] . " ' ";
|
|
|
|
if (!$result = @mysqli_query($conn, $query)) {
|
|
|
|
die(mysqli_error($conn));
|
|
echo json_encode("FAILURE");
|
|
} else {
|
|
echo json_encode("SUCCESS");
|
|
}
|
|
}
|