I'm trying to build a simple postcode/ zip code check for our restaurant to check if a customer is within a list of postcodes we serve. Every time I query the postcode it returns a "not found" result and I can't work out why.
$result = mysql_query("SELECT * FROM functions-postcodes WHERE postcode = 'PO111XX'");
if(mysql_num_rows($result) == 0) {
echo "Postcode not within coverage area (postcode not found in table)";
} else {
echo "Postcode IS within coverage area";
}
Here is what the database table looks like: Database screenshot