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

Reply via email to