RaythMistwalker Posted January 9, 2010 Share Posted January 9, 2010 $id = $_SESSION['SEE_MEMBER_ID']; $sessID = $_SESSION['SESSION_ID']; $unQry = "SELECT login FROM members WHERE member_id='$id'"; $unRes = mysql_query($unQry); $un = mysql_result($unRes,0,"login"); $delSessQry = "DELETE FROM sessions WHERE sess_id='$sessID'"; $sendDelQry=mysql_query($delSessQry) or trigger_error('Query error! Query: <pre>'.$sendDelQry.'</pre>Reason: ' . mysql_error()); $delSessQry = "DELETE FROM sessions WHERE username='$un'"; $sendDelQry=mysql_query($delSessQry) or trigger_error('Query error! Query: <pre>'.$sendDelQry.'</pre>Reason: ' . mysql_error()); Ok this is part of logout.php For some reason this is just refusing to remove the data from the sessions table and i've ran out of ideas now. I'm getting slightly annoyed as well cos of this. Also PHP editor is returning no errors in coding either Link to comment https://forums.phpfreaks.com/topic/187848-not-removing-session-info/ Share on other sites More sharing options...
savagenoob Posted January 9, 2010 Share Posted January 9, 2010 Have you printed your $un variable to see that your fetching the correct result from the query? Maybe try ORDER BY member_id DESC LIMIT 1 to insure your only getting 1 result? Just throwing out things that I would be thinking, sorry if I am not much help. Link to comment https://forums.phpfreaks.com/topic/187848-not-removing-session-info/#findComment-991814 Share on other sites More sharing options...
RaythMistwalker Posted January 9, 2010 Author Share Posted January 9, 2010 :L found the error.. i didn't actually establish a DB connection cos it never used to use databases >< Link to comment https://forums.phpfreaks.com/topic/187848-not-removing-session-info/#findComment-991825 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.