[Wolves] Any PHP/MySQL experts who can help me?

James Dalley j.dalley at hotmail.co.uk
Thu May 3 22:52:34 BST 2007


> Date: Thu, 3 May 2007 16:42:49 +0100> From: ph004h7245 at blueyonder.co.uk> To: wolves at mailman.lug.org.uk> Subject: [Wolves] Any PHP/MySQL experts who can help me?> > Hi> > I have an interesting problem, well, I guess not interesting as much as > annoying the hell out of me at the moment!> > I have a script that logs a user out of my system:-> > <?php> > > > session_start();> > include 'dbcon.php';> > > /* Change database entry to say that the user is no longer logged in */> > $userID = $_SESSION['user'];> > $result = mysql_query(" UPDATE userAccount SET loggedOn = 'N' WHERE > userID = '$userID' ");> > > /* destroy session */> session_destroy();> > mysql_close( $link );> > header("Location: logout.html");> > ?>> > Now, on my server this works fine, I check the userAccount database > table, and the loggedOn field is correctly set to "N" as it should be to > say the user has logged off, but for some reason, the test system I'm > running on sourceforge dosen't do this, the user logs of, but there > entry is still loggedOn = "Y".> > On my own server where the script works I'm running Ubuntu Dapper 6.06 > LTS installed with the LAMP option, so it auto installs PHP5 and MYSQL5.> > The even stranger thing is that the login script, which uses the exact > same PHP/MySQL code as above, but in that case to set loggedOn = "Y" > works perfectly on both my server and sourceforge!> > I'm stumped, give me more coffee......> > What are the contents of dbcon.php?Jay
_________________________________________________________________
Try Live.com: where your online world comes together - with news, sports, weather, and much more.
http://www.live.com/getstarted
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/wolves/attachments/20070503/ceb7ac60/attachment.html


More information about the Wolves mailing list