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 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? 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); } Link to comment https://forums.phpfreaks.com/topic/209573-compare-ip-address/#findComment-1094070 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.