<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>> Date: Thu, 3 May 2007 16:42:49 +0100<br>> From: ph004h7245@blueyonder.co.uk<br>> To: wolves@mailman.lug.org.uk<br>> Subject: [Wolves] Any PHP/MySQL experts who can help me?<br>> <br>> Hi<br>> <br>> I have an interesting problem, well, I guess not interesting as much as <br>> annoying the hell out of me at the moment!<br>> <br>> I have a script that logs a user out of my system:-<br>> <br>> <?php<br>> <br>> <br>> <br>> session_start();<br>> <br>> include 'dbcon.php';<br>> <br>> <br>> /* Change database entry to say that the user is no longer logged in */<br>> <br>> $userID = $_SESSION['user'];<br>> <br>> $result = mysql_query(" UPDATE userAccount SET loggedOn = 'N' WHERE <br>> userID = '$userID' ");<br>> <br>> <br>> /* destroy session */<br>> session_destroy();<br>> <br>> mysql_close( $link );<br>> <br>> header("Location: logout.html");<br>> <br>> ?><br>> <br>> Now, on my server this works fine, I check the userAccount database <br>> table, and the loggedOn field is correctly set to "N" as it should be to <br>> say the user has logged off, but for some reason, the test system I'm <br>> running on sourceforge dosen't do this, the user logs of, but there <br>> entry is still loggedOn = "Y".<br>> <br>> On my own server where the script works I'm running Ubuntu Dapper 6.06 <br>> LTS installed with the LAMP option, so it auto installs PHP5 and MYSQL5.<br>> <br>> The even stranger thing is that the login script, which uses the exact <br>> same PHP/MySQL code as above, but in that case to set loggedOn = "Y" <br>> works perfectly on both my server and sourceforge!<br>> <br>> I'm stumped, give me more coffee......<br>> <br><br><br>PS Silly Question but, Have you tried mysql_close then destoy??<br><br /><hr />Be one of the first to try Windows Live Mail. <a href='http://ideas.live.co.uk/ProgramPage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d&pageId=0' target='_new'>Windows Live Mail.</a></body>
</html>