Forum Moderators: open
jQuery.ajax({
url: 'geocoder.php',
dataType:'json',
type: "POST",
data: {
nelat: northEastLat,
nelong: northEastLong,
swlat: southWestLat,
swlong: southWestLong
},
}).done(function(brArray) {
//bla bla
}
$isAjax = isset($_SERVER['HTTP_X_REQUESTED_WITH']) AND strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) === 'xmlhttprequest';
if(!$isAjax) {
$user_error = 'Access denied - not an AJAX request...';
trigger_error($user_error, E_USER_ERROR);
}
function string_db ($value)
{
$value = (get_magic_quotes_gpc()) ? stripslashes($value) : $value;
return mysql_real_escape_string($value);
}