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); ?> 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
Archived
This topic is now archived and is closed to further replies.