0; } 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); ($res) ? printf("true") : printf("false"); } ?>