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

Philip Harper ph004h7245 at blueyonder.co.uk
Thu May 3 16:42:53 BST 2007


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......




More information about the Wolves mailing list