Zip Code Service (or Delivery) Area

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
xdLjt
Forum Newbie
Posts: 1
Joined: Wed Nov 04, 2009 12:09 am

Zip Code Service (or Delivery) Area

Post 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
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: Zip Code Service (or Delivery) Area

Post 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");
Post Reply