Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $mysqli = new mysqli('localhost', 'user', 'haslo', 'nazwabazy');
- if ($mysqli->connect_errno) {
- $mysqli->connect_errno . ") " . $mysqli->connect_error;
- exit();
- }
- if (!($stmt = $mysqli->prepare("INSERT INTO Track (Latitude, Longitude, ID) VALUES (?,?,?)"))) {
- $mysqli->errno . ") " . $mysqli->error;
- }
- $Latitude = $_GET['lt'];
- $Longitude = $_GET['ln'];
- $ID = $_GET['d'];
- if (!$stmt->bind_param("ddss", $Latitude, $Longitude, $ID)) {
- $stmt->errno . ") " . $stmt->error;
- }
- if (!$stmt->execute()) {
- $stmt->errno . ") " . $stmt->error;
- }
- //-- Closing connection / cleanup
- $stmt->close();
- mysqli_close($mysqli);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment