Do this:<br><br>$result = mysql_query(" UPDATE userAccount SET loggedOn = 'N' WHERE userID = '$userID' ") or die(mysql_error());<br><br>This will promptly alert you if you have any database problems.
<br><br>I always do this by habit, as I'm always getting database errors.<br><br><br><div><span class="gmail_quote">On 5/8/07, <b class="gmail_sendername">Philip Harper</b> <<a href="mailto:ph004h7245@blueyonder.co.uk">
ph004h7245@blueyonder.co.uk</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>Thanks for all the suggestions....but I've tried most of them before!
<br><br>The dbcon.php file simply contains the standard PHP code I use to create<br>a connection to the MySQL database.<br><br>I think it is just a case of something working slightly different on the<br>sourceforge server, as any PHP developer knows, PHP has so many
<br>different options and compilation options it is sometimes tricky to find<br>which one is causing the problem on a different server that you are<br>installing your system on, and it's often a case of just trying to make
<br>your scripts as portable as possible. Maybe I'll raise a support request.<br><br>James Dalley wrote:<br>> > Date: Thu, 3 May 2007 16:42:49 +0100<br>> > From: <a href="mailto:ph004h7245@blueyonder.co.uk">
ph004h7245@blueyonder.co.uk</a><br>> > To: <a href="mailto:wolves@mailman.lug.org.uk">wolves@mailman.lug.org.uk</a><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<br>> 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>> ------------------------------------------------------------------------<br>> Be one of the first to try Windows Live Mail. Windows Live Mail.<br>> <<a href="http://ideas.live.co.uk/ProgramPage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d&pageId=0">
http://ideas.live.co.uk/ProgramPage.aspx?versionId=5d21c51a-b161-4314-9b0e-4911fb2b2e6d&pageId=0</a>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________
<br>> Wolves LUG mailing list<br>> Homepage: <a href="http://www.wolveslug.org.uk/">http://www.wolveslug.org.uk/</a><br>> Mailing list: <a href="mailto:Wolves@mailman.lug.org.uk">Wolves@mailman.lug.org.uk</a><br>
> Mailing list home: <a href="https://mailman.lug.org.uk/mailman/listinfo/wolves">https://mailman.lug.org.uk/mailman/listinfo/wolves</a><br><br><br><br>_______________________________________________<br>Wolves LUG mailing list
<br>Homepage: <a href="http://www.wolveslug.org.uk/">http://www.wolveslug.org.uk/</a><br>Mailing list: <a href="mailto:Wolves@mailman.lug.org.uk">Wolves@mailman.lug.org.uk</a><br>Mailing list home: <a href="https://mailman.lug.org.uk/mailman/listinfo/wolves">
https://mailman.lug.org.uk/mailman/listinfo/wolves</a><br></blockquote></div><br>