Posted by Anasta on 04/30/05 09:25
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");
}
?>
Navigation:
[Reply to this message]
|