Jump to content

Archived

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

vicky57t

help regarding IP address

Recommended Posts

hi all,

i built a small app in php & mySql which resides on an apache server with gentoo linux.

I use it on my local network to post knowlwdgebase entries & solutions from simple webpage with textboxes & text areas.

what I want is some way in PHP code from whcih I can get the IP address of people entring data in the tables thru the application and maybe get the entry in my database.

Kindly help


thanks

Share this post


Link to post
Share on other sites
to expand on what samshell said, in your when you send your info from the form to the database just simply do this
$ip=$_SERVER['REMOTE_ADDR'];

and then just add it into the INSERT like the rest of the data :)

Share this post


Link to post
Share on other sites
[!--quoteo(post=374888:date=May 18 2006, 01:46 PM:name=samshel)--][div class=\'quotetop\']QUOTE(samshel @ May 18 2006, 01:46 PM) [snapback]374888[/snapback][/div][div class=\'quotemain\'][!--quotec--]
$_SERVER['REMOTE_ADDR'] will be useful for you
[/quote]



THANX A LOT [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

[!--quoteo(post=374898:date=May 18 2006, 03:40 PM:name=EchoNinja)--][div class=\'quotetop\']QUOTE(EchoNinja @ May 18 2006, 03:40 PM) [snapback]374898[/snapback][/div][div class=\'quotemain\'][!--quotec--]
to expand on what samshell said, in your when you send your info from the form to the database just simply do this
$ip=$_SERVER['REMOTE_ADDR'];

and then just add it into the INSERT like the rest of the data :)
[/quote]


Thanks a LOT [img src=\"style_emoticons/[#EMO_DIR#]/smile.gif\" style=\"vertical-align:middle\" emoid=\":smile:\" border=\"0\" alt=\"smile.gif\" /]

Share this post


Link to post
Share on other sites

×

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.