File manager - Edit - /home/autoph/public_html/api/aha/save_preferred_drinks.php
Back
<?php include '../../../cfg/ahaconn.php'; $mykey = $_GET['keyID']; //echo "Arnel " . $mykey; if($mykey =="save-6e59e008b5348b452b615a3033729daae383-drinks"){ // SQL query $userID = $_GET['userID']; $drinksID = $_GET['drinks_id']; $plateNo = $_GET['plateNo']; $sanitizedDrinksName = $conn->real_escape_string($drinksName); // Create a DateTime object from the AM/PM time $dateTime = DateTime::createFromFormat('h:i A', $timeSlot); // Convert to 24-hour format $sql = "INSERT INTO aha_preferred_drinks (`aha_user_id`,`drink_id`,`vehicle_plate`) VALUES ('$userID','$drinksID','$plateNo')"; if ($conn->query($sql) === TRUE) { $stat="Thank you! We are delighted to serve you."; } else { $stat="Error, unable to save record. Please contact us via Live Chat Support. Thank you!"; } // Output the result in JSON format header('Content-Type: application/json'); echo json_encode(["status" =>$stat]); } // Close connection $conn->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0 |
proxy
|
phpinfo
|
Settings