hi
I am trying to create a sessions log in/out system but i keep getting an error when it runs this. I cant see what the problem is. The error i get is:
Warning: Supplied argument is not a valid MySQL-Link resource in /home/dwp/dwp-www/themix/700/sessions.php on line 89
any help would be apriciated. thanks.
//---------------------------------------------------------------------------------------
// Look for, log out, and delete all old Sessions
function CheckSession($db)
{
$expirationtime = time();
$Q04 = "SELECT *
From Sessions";
//WHERE Time < '$expirationtime'";
$R04 = Mysql_Query($Q04,$db); // this is line 89
while($Row = Mysql_Fetch_Row($R04))
{
$Session=$row[0];
$UserID=$row[2];
$UserName=$row[3];
$UserIP=$row[7];
deleteSession($db,$Session);
writeLog($db,$UserID,$UserName,$UserIP,"2");
}
return;
}