Forum Moderators: coopster
$paramsGood = true;
$reason = '';
if ( (isset($_GET['set'])) && (isset($_GET['lat'])) && (isset($_GET['lng'])) ) {
$set = $_GET['set'];
$lat = $_GET['lat'];
$lng = $_GET['lng'];
if (($set<1) || ($set>5) || ($set != floor($set)) { $paramsGood = false; $reason .= "SET out of bounds.\n"; }
if (($lat<-90) || ($lat>90)) { $paramsGood = false; $reason .= "LAT out of bounds.\n" }
if (($lng<-180) || ($lng>180)) { $paramsGood = false; $reason .= "LNG out of bounds.\n"; }
} else {
$paramsGood = false; $reason = "Parameter missing.";
}
if (!$paramsGood) { die($reason); }