I think there is a syntax issue with:
Code:
$sql = "SELECT * FROM fastway_zones WHERE $topcode >= f_postcode and $topcode <= f_postcode";
Where normally correct syntax is more like:
Code:
$result = mysql_query("SELECT * FROM data");