";
}
if (strlen($lng) < 6) {
$problem = TRUE;
$response1 = "LONGITUDE too short.
";
}
// Check if numeric
if(!is_numeric($lat)) {
$problem = TRUE;
$response0a = "LATITUDE not numeric.
";
}
if(!is_numeric($lng)) {
$problem = TRUE;
$response1a = "LONGITUDE not numeric.
";
}
if (!$problem) { // If no problem
require("path/db_connect.php"); // Connect to db
// Build MySQL query
$query = "INSERT INTO markers02 (lat, lng, datetime) VALUES ('$lat', '$lng', NOW())";
// Run query
$result = @mysql_query ($query);
// Check result
if ($result) {
mysql_close();
$response2 = "MySQL query OK.
";
} else { // No result
$response2 = "MySQL query didn't run.
";
}
$response3 = "Co-ordinates entered."; // End
$showbutton = FALSE;
} else { // Problem
$response3 = "Try again."; // End
}
}
?>