Page 1 of 1

Zip Code Service (or Delivery) Area

Posted: Wed Nov 04, 2009 12:24 am
by xdLjt
I need help writing a script that will allow me to generate a true or false statement that will redirect to a URL.

(Assuming that I will have all the zip code available within a CSV or TXT file)

This is how the script should work: Someone visits the website and wants to see if we can deliver to their location, they enter their zip code and if it matches one of the zip code in the database file, the script should return with either service_yes.php or service_no.php

Thanks,
xdLjt

Re: Zip Code Service (or Delivery) Area

Posted: Wed Nov 04, 2009 2:45 am
by John Cartwright
Theres no sense in learning by giving you the outright solution, give it a shot. Hint:

file() + in_array() + header("Location: your_url.php");