Add missing quotes...
This commit is contained in:
parent
a2131f6ee7
commit
d2a9dd41c3
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ if (isset($_GET["lat"]) && preg_match("/^-?\d+\.\d+$/", $_GET["lat"]) && isset($
|
|||
die("Connection failed: " . $conn->connect_error);
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO tracker (device, lat, lon) VALUES (" . mysqli_real_escape_string($conn, $_GET['device']) . ", " . mysqli_real_escape_string($conn, $_GET['lat']) . ", " . mysqli_real_escape_string($conn, $_GET['lon']) . ");";
|
||||
$sql = "INSERT INTO tracker (device, lat, lon) VALUES ('" . mysqli_real_escape_string($conn, $_GET['device']) . "', " . mysqli_real_escape_string($conn, $_GET['lat']) . ", " . mysqli_real_escape_string($conn, $_GET['lon']) . ");";
|
||||
|
||||
if (!mysqli_query($conn, $sql)) {
|
||||
die('Error: ' . mysqli_error($conn));
|
||||
|
|
Loading…
Reference in a new issue