Jump to content

IP in forms


Reg Web

Recommended Posts

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

not sure why you'd need mysql at all to do this, but the above will create a hidden field with the user's IP address in it.

cheers
Mark
Link to comment
https://forums.phpfreaks.com/topic/24741-ip-in-forms/#findComment-112664
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.