Fatal error: Call to a member function connect() on a non-object in /includes/online.inc.php on line 5

21 views Asked by At

Sorry but now i have another error ... : Fatal error: Call to a member function connect() on a non-object in /home/u909132125/public_html/includes/online.inc.php on line 5 here is my code :

<?php
$uo_sessionTime = 5;
error_reporting(E_ERROR | E_PARSE);
$uo_ip = $_SERVER['REMOTE_ADDR'];
$myDb->connect();
$uo_query = "DELETE FROM yob_usersonline WHERE unix_timestamp() - lastvisit >= $uo_sessionTime * 60"; mysql_query($uo_query);
$uo_query = "SELECT lastvisit FROM yob_usersonline WHERE visitor = '$uo_ip'";
$uo_result = mysql_query($uo_query);
if(mysql_num_rows($uo_result) == 0) {
$uo_query = "INSERT INTO yob_usersonline VALUES('$uo_ip', unix_timestamp())";
mysql_query($uo_query);
} else {
$uo_query = "UPDATE yob_usersonline SET lastvisit = unix_timestamp() WHERE visitor = '$uo_ip'";
mysql_query($uo_query); } $myDb->close();
?>
0

There are 0 answers