File manager - Edit - /home/wwwroot/camplus.hk/ibeacon.camplus.hk/public_html/locate_insert.php
Back
<?php $id = $_GET['id']; $beacon = $_GET['beacon']; $servername = "localhost"; $username = "camplus_ibeacon"; $password = "ibeacon"; $dbname = "camplus_ibeacon"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connection failed: " . $conn->connect_error); } $sql = "INSERT INTO users_record (beacon, android_id) VALUES ('" . $beacon . "', '" . $id . "')"; if ($conn->query($sql) === TRUE) { echo "Record for user " . $id . " with beacon " . $beacon . " uploaded successfully"; } else { echo "Error: " . $sql . "<br>" . $conn->error; } $conn->close(); ?>
| ver. 1.4 |
Github
|
.
| PHP 7.2.34 | Generation time: 0.6 |
proxy
|
phpinfo
|
Settings