Beppis Posted August 2, 2010 Share Posted August 2, 2010 Hi! What should the code be if I get an IP address to a postback url and I want to find that member in my database who has that IP-address? The postback comes like this http://yoursite.com/postback.php?ip=xxx Please help Quote Link to comment https://forums.phpfreaks.com/topic/209573-compare-ip-address/ Share on other sites More sharing options...
Beppis Posted August 2, 2010 Author Share Posted August 2, 2010 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/209573-compare-ip-address/#findComment-1094067 Share on other sites More sharing options...
JonnoTheDev Posted August 2, 2010 Share Posted August 2, 2010 Is it definately POST or GET, as the url you have posted contains parameters. Use the correct superglobal $_POST, $_GET. i.e postback.php $query = mysql_query("SELECT * FROM users WHERE ip='".mysql_real_escape_string($_POST['ip'])."'"); if(mysql_num_rows($query)) { $thisUser = mysql_fetch_assoc($query); } Quote Link to comment https://forums.phpfreaks.com/topic/209573-compare-ip-address/#findComment-1094070 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.