ok i coded a show how many users are online and when i go to see it in my broswer this comes up
Warning: MySQL Connection Failed: Access denied for user: 'babesoncams@216.131.80.197' (Using password: YES) in /home/httpd/babesoncams.com/html/user.php on line 2
Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/httpd/babesoncams.com/html/user.php on line 7
Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/httpd/babesoncams.com/html/user.php on line 10
Warning: MySQL: A link to the server could not be established in /home/httpd/babesoncams.com/html/user.php on line 10
Useronline Insert Failed >
Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/httpd/babesoncams.com/html/user.php on line 15
Warning: MySQL: A link to the server could not be established in /home/httpd/babesoncams.com/html/user.php on line 15
Useronline Delete Failed >
Warning: MySQL Connection Failed: Access denied for user: 'nobody@localhost' (Using password: NO) in /home/httpd/babesoncams.com/html/user.php on line 20
Warning: MySQL: A link to the server could not be established in /home/httpd/babesoncams.com/html/user.php on line 20
Useronline Select Error >
Warning: Supplied argument is not a valid MySQL result resource in /home/httpd/babesoncams.com/html/user.php on line 25
Warning: No MySQL-Link resource supplied in /home/httpd/babesoncams.com/html/user.php on line 27
users online
heres the code to what i did can anyone help me?
<?PHP
$timestamp = time();
$timeout = $timestamp-$timeoutseconds;
mysql_connect($216.131.80.197, $babesoncams, $bastui8939);
$insert = mysql_db_query($database, "INSERT INTO useronline VALUES
('$timestamp','$REMOTE_ADDR','$PHP_SELF')");
if(!($insert)) {
print "Useronline Insert Failed > ";
}
$delete = mysql_db_query($database, "DELETE FROM useronline WHERE timestamp<$timeout");
if(!($delete)) {
print "Useronline Delete Failed > ";
}
$result = mysql_db_query($database, "SELECT DISTINCT ip FROM useronline WHERE file='$PHP_SELF'");
if(!($result)) {
print "Useronline Select Error > ";
}
$user = mysql_num_rows($result);
mysql_close();
if($user == 1) {
print("$user user online\n");
} else {
print("$user users online\n");
}
?>