34 lines
915 B
PHP
34 lines
915 B
PHP
<?php
|
|
require_once('../../../fixed/config/go_con.php');
|
|
|
|
$lastid = $_POST['lastid'];
|
|
|
|
$value = 0;
|
|
|
|
if (isset($_POST['lastid'])) {
|
|
|
|
$lastid_php_sql_2 = mysqli_query($db, "SELECT MAX(`id`) AS `id` FROM `book_details`;");
|
|
$lastid_php_2 = mysqli_fetch_array($lastid_php_sql_2);
|
|
|
|
//if ($lastid != $lastid_php_2[0]) {
|
|
// $value = 1;
|
|
//} else {
|
|
// $value = 0;
|
|
//}
|
|
|
|
if (($lastid+11) < $lastid_php_2[0]) {
|
|
$value = 1;
|
|
} else {
|
|
$value = 0;
|
|
}
|
|
}
|
|
|
|
// Set the return value in json format
|
|
$returnValue = json_encode(array('val' => $value));
|
|
|
|
// Setting the header information to json format
|
|
header('Content-Type: application/json');
|
|
|
|
// Display the information and return the control to the calling page
|
|
echo $returnValue;
|
|
?>
|