this is supposed to log the ip's of people connecting to my site but it wont work help?
<?php
$username="****";
$password="*****";
$database="ipconnect";
$ip=@$REMOTE_ADDR;
mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query = "INSERT INTO ip VALUES ('$ip')";
mysql_query($query);
mysql_close();
?>