Zoofu Posted January 3, 2010 Share Posted January 3, 2010 $CIP = $_SERVER['REMOTE_ADDR']; $selv300=mysql_query("SELECT * FROM `online` WHERE `ip`='$CIP'") OR die(mysql_error()); $rowv300=mysql_fetch_assoc($selv300); if($rowv300){ }else{ $sql400 = "INSERT INTO `online` (`ip`) VALUES ('".$CIP."')"; $res400 = mysql_query($sql400) or die(mysql_error()); } It only works when they're logged in. Otherwise it won't recognise them as an IP. Quote Link to comment 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.