Ok so what I want to do is only execute the folowing code when the user enters a postcode to be within Greenwich according to the Latitude and Longitude of Greenwich how do I do this? As each time the postcode changes both the latitude and longitude changes?

$val = getLnt($zip);
 echo "Latitude: ".$val['lat']."<br>";
 echo "Longitude: ".$val['lng']."<br>";


 $Latitude = $val['lat'];
 $Longitude = $val['lng'];


if( $Latitude == 51.483462) 

 {
 //// code here
 }
Member Avatar
diafol

Why don't you just have a list of postcodes for Greenwich (array) and if the postcode matches one of the entries, then bingo.