diff --git a/blomzt/main.php b/blomzt/main.php index 404f40a..fe2d3b4 100644 --- a/blomzt/main.php +++ b/blomzt/main.php @@ -33,23 +33,23 @@ if (!TableExists($config["db_table"], $conn)) {
- - + +
@@ -65,8 +65,8 @@ function TableExists($table, $conn) { return mysqli_num_rows($res) > 0; } -function addToTable($lon, $lat, $url, $table, $conn) { - $sql = "INSERT INTO `" . $table . "` (`id`, `location`, `url`, `date_added`) VALUES (NULL, GeomFromText('POINT(" . $lon . $lat . ")',4326), 'test', CURRENT_TIMESTAMP)"; +function addToTable($lat, $lon, $url, $table, $conn) { + $sql = "INSERT INTO `" . $table . "` (`id`, `location`, `url`, `date_added`) VALUES (NULL, GeomFromText('POINT(" . $lon ." " . $lat . ")',4326), 'test', CURRENT_TIMESTAMP)"; //$sql = mysqli_real_escape_string($conn, $sql); printf($sql); $res = mysqli_query($conn, $sql);