/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
ajax
/
application
/
up file
home
<?php include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); $list = []; $sql = "SELECT MAX(`end_no`) as last_no FROM `tbl_storage`"; $result = mysqli_query($connection, $sql); $row = mysqli_fetch_assoc($result); $start_no = $row['last_no'] + 1; $end_no = $row['last_no'] + 500; $sqlInsert = "INSERT INTO `tbl_storage` (`start_no`, `end_no`, `storage_count`) VALUES ('$start_no', '$end_no', '0')"; if (mysqli_query($connection, $sqlInsert)) { $status = 1; } else { $status = 0; } $arr['status'] = $status; echo json_encode($arr); ?>