vicky57t Posted May 18, 2006 Share Posted May 18, 2006 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 helpthanks Quote Link to comment https://forums.phpfreaks.com/topic/9909-help-regarding-ip-address/ Share on other sites More sharing options...
samshel Posted May 18, 2006 Share Posted May 18, 2006 $_SERVER['REMOTE_ADDR'] will be useful for you Quote Link to comment https://forums.phpfreaks.com/topic/9909-help-regarding-ip-address/#findComment-36828 Share on other sites More sharing options...
echoninja Posted May 18, 2006 Share Posted May 18, 2006 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 Link to comment https://forums.phpfreaks.com/topic/9909-help-regarding-ip-address/#findComment-36838 Share on other sites More sharing options...
vicky57t Posted May 18, 2006 Author Share Posted May 18, 2006 [!--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\" /] Quote Link to comment https://forums.phpfreaks.com/topic/9909-help-regarding-ip-address/#findComment-36841 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.