Because for some of us, that part of our body is the smartest thing we have
going, and the rest of us is not engaged in the question.

Warren Vail

-----Original Message-----
From: bb9876 [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 04, 2004 9:41 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Zip Codes


Thanks for the sarcasm, it definitely helps.

Why is it that when people ask a question there is always someone that has a
smartass answer?

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Thursday 04 November 2004 16:59, bb9876 wrote:
> > Is there any way to use PHP to determine the zip code someone is
visiting
> > from, assuming they are all from the US?
>
> Something like this should work:
>
> ---------- start
> <form action="<?php echo $_SERVER['PHP_SELF'];  ?>" method="POST"> 
> Please input zipcode <input type="text" name="zipcode" value=""> 
> <input type="submit" name="submit" value="Enter"> </form>
>
> <?php
>   if (!empty($_POST['zipcode'])) {
>     echo "Whoa! your zipcode is {$_POST['zipcode']}";
>   }
> ?>
> ---------- end
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> ------------------------------------------
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> ------------------------------------------
> /*
> Thinking you know something is a sure way to blind yourself.
>   -- Frank Herbert, "Chapterhouse: Dune"
> */

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to