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 #170712 is a reply to message #170710] Tue, 16 November 2010 05:14 Go to previous messageGo to previous message
richard is currently offline  richard   
Messages: 213
Registered: June 2013
Karma:
Senior Member
On Mon, 15 Nov 2010 22:51:23 -0500, Jerry Stuckle 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?

Wouldn't the $_Server stuff have to be assigned to a variable first, then
echoed through the variable?
[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: Thu Nov 28 16:10:42 GMT 2024

Total time taken to generate the page: 0.06553 seconds