File manager - Edit - /home/autoph/public_html/api/aha/aha_saveRatings.php
Back
<?php include '../../../cfg/ahaconn.php'; $mykey = $_GET['keyID']; if($mykey =="6e59e008b5348b452b615a3033729daae383SRating"){ $userID = $_GET['userID']; $serviceID = $_GET['serviceID']; $scoreA = $_GET['scoreA']; $scoreB = $_GET['scoreB']; $notes = $_GET['notes']; $scores =($scoreA + $scoreB) / 2; //insert message $insMsg ="INSERT INTO aha_service_ratings ( `aha_user_id`, `service_id`, `scoreA`, `scoreB`, `scores`, `comment_notes`) VALUES( '$userID', '$serviceID', '$scoreA', '$scoreB', '$scores', '$notes')"; if ($conn->query($insMsg) === TRUE) { $uSQL = "UPDATE `service_bookings` SET `score` = '$scores',`survey_completed`='Yes' WHERE `id` = '$serviceID'"; if ($conn->query($uSQL) === TRUE) { $stat = "Record has been saved."; } } else { $stat="Error, unable to save record."; } echo json_encode(["status" => "$stat"]); } // Close connection $conn->close(); ?>
| ver. 1.4 |
.
| PHP 7.3.33 | Generation time: 0.01 |
proxy
|
phpinfo
|
Settings