veluit06 Posted May 6, 2009 Share Posted May 6, 2009 hi i want to store my website viewers ipaddress and no of time viewings, everything working fine, but not registered is coming anyone plz clear and give some solution below is my coding <? $domain = GetHostByName($REMOTE_ADDR); $productname = "Product"; $clicks = GetHostByName($REMOTE_ADDR); $ipaddress = $domain; $con = mysql_connect("localhost","root"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("popups", $con); $s="INSERT INTO pro VALUES('$productname', '$ipaddress', '$clicks')"; if(mysql_query($s,$con)) { echo "SUCCESSFULLY INSERTED"; } else { echo "NOT REGISTERED"; } mysql_close($con); ?> Quote Link to comment https://forums.phpfreaks.com/topic/157044-storing-users-ipaddress-and-number-of-time-viewings/ 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.