0

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
 }
2
Contributors
1
Reply
8
Views
3 Years
Discussion Span
Last Post by diafol
0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.