Forum Moderators: coopster
I am very new to PHP and am looking for a solution for the following:
I have a database of UK postcodes. If a user enters a matching postcode into a text field on a HTML or PHP page then they get taken to a "success page" where as if they enter a postcode not in the database then they get a "fail page"
I have a rough idea how to connect the database and search via "SELECT * FROM ... etc" but after this i am sadly lacking in knowledge
any help would be greatly accepted.
Thanks
if ($result <> "")
{
DO THIS IF THERE IS A RESULT MATCHING THE POST CODE
}
else if ($result == "")
{
DO THIS IF THERE ARE NO RESULSTS MATCHING THE POST CODE
}
...where $result is any field retrieved with your "WHERE postcode = '$enteredpostcode'" sql statement.