FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Get IP Address Help
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Get IP Address Help [message #170713 is a reply to message #170710] Tue, 16 November 2010 06:04 Go to previous messageGo to previous message
Jim Higgins is currently offline  Jim Higgins
Messages: 20
Registered: November 2010
Karma:
Junior Member
On Mon, 15 Nov 2010 22:51:23 -0500, Jerry Stuckle
<jstucklex(at)attglobal(dot)net> wrote:

> On 11/15/2010 10:25 PM, Jim Higgins wrote:
>>
>> PHP 5.2.13
>>
>> I'm trying to capture a visitor's IP address in a web form (a ballot
>> for club office) and am coming up empty handed. Purpose is to head
>> off ballot box stuffing. All sorts of Googling keeps coming up with
>> the following...
>>
>> <input type="hidden" name="ip"
>> value="<?php echo $_SERVER['REMOTE_ADDR'] ?>">
>>
>> which just gives me the literal PHP script between the double quotes
>> instead of the voter's IP address.
>>
>> Help please?
>
> Is this on a page with a .php extension? Is your web server set up to
> parse php files?

Oh crap! HTM extension. And I know better! Changed the extension,
works fine now. Thank you, Jerry!

I'm a small step or two above the novice level, but I've been using
PHP and MySQL for very simple tasks long enough that I knew something
was seriously strange when the above wouldn't work. Didn't think the
answer would be quite so embarrassing.

Thanks again.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to do the String concatenation with PHP - running a little Parser based on cURL
Next Topic: setup of curl-multi: looping over a bunch of sites [how to adress the array]
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Mon Nov 25 01:49:11 GMT 2024

Total time taken to generate the page: 0.07297 seconds