/    Sign up×
Community /Pin to ProfileBookmark

View page by users region?

I know there has to be a way to do this but I am not sure how to go about it. I have a client with a web page that wants people in the 11111, 22222, 33333 and surrounding zip codes to see a relevant contact page for the local office to them. But then he also wants users outside of those listed zip codes, (could be up to 10 zip codes) to see another page with relevant contact information for outside the local office. So if anyone has information that could possibly help me, I would greatly appreciate it.

Thanks for your help in advance.

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@JeremyAJul 30.2008 — you can store each zip code in a table and then just run a MySQL query WHERE zip='$userzip' OR zip2='$userzip' and so on..

or you can display the offices when they sign up and have them simply choose the one closest to them (display only the ones in their state)....thats the easy way out.

unless you wish devise a system of rating distance from offices to automatically detect the closest office which is a pain.
Copy linkTweet thisAlerts:
@dtetechauthorJul 30.2008 — Isnt there a way to do it by DNS lookup on the users IP? I have never setup anything like it, but just asking.


Thanks for your help.
×

Success!

Help @dtetech spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...