Hi everyone,
I run two websites from the same host and both have the following code in a form to record the ip address of a user making a submission.
<INPUT TYPE=HIDDEN NAME="uip" VALUE="<?php echo "$REMOTE_ADDR"?>" readonly>
Strangely the code works on one website but gives an empty value on the other. The site that isn't working uses sessions - can this cause problems?
Any ideas why the code might not be working?
Thanks for your help!
Stewart
recording ip address problem
Moderator: General Moderators
- stereofrog
- Forum Contributor
- Posts: 386
- Joined: Mon Dec 04, 2006 6:10 am
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Register globals are evil and should be avoided as though they could light you on fire.