sessions problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Anyone know how to update a record on logout, heres what i am using for
login, however there iare no variables for the logout page.

?
session_start();  // Start Session

include("connect.php");

$username = $_POST['username'];
$password = $_POST['password'];

   // Register some session variables
   session_register('username');
   $_SESSION['username'] = $username;
 //sets user online to yes
$sql = mysql_query("UPDATE users SET online='1' WHERE username='$username'
AND password='$password'");

   if (($username == "admin") And ($password == "admin")) {
    header("location: login_admin.php");
   } else {
    header("location: login_success.php");
   }

?>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux