...

View Full Version : IP address in a form



wappo
04-14-2004, 02:01 PM
Hi all how can you display an IP address in a form which is mailable,
thanks for your help,
wappo

bcarl314
04-14-2004, 02:11 PM
This should do it...



<input type="hidden" name="ipaddress" value="<?php echo $_SERVER['REMOTE_ADDR'];?>" />

wappo
04-14-2004, 02:44 PM
<input type="hidden" name="ipaddress" value="<?php echo $_SERVER['REMOTE_ADDR'];?>" />

How do you put that inside an echo tag, i keep getting errors lol!

bcarl314
04-14-2004, 02:47 PM
Um, you don't need to.

But, if want want to, the following would work...



echo "<input type='hidden' name='ipaddress' value='".$_SERVER['REMOTE_ADDR']."' />";

wappo
04-14-2004, 02:53 PM
Wow,
thankyou so much for your time



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum