After authentication, store a value in a cookie and then on top of every
page check the value of the cookie. If it is the same that you stored after
authentication, allow the user to continue, else redirect him to the login
page. A value can be stored in the cookies using setcookie() function e.g.
setcookie("cookie_name", "cookie_value");
You can check the value of the cookie using syntax:
if ($cookie_name != "authenticated"){
header ("Location: login.php") ;
}
(PHP automatically converts cookie names into variables)
You may have received more detailed response had you posted this message to
a PHP list.
Majid
----- Original Message -----
From: "payam" <torkian@c...>
To: "JavaScript HowTo" <javascript_howto@p...>
Sent: Saturday, March 01, 2003 6:45 AM
Subject: [javascript_howto] login with username and password
> Hello,
> Could anybody give me a short idea on how to develope a simple login using
> cookie's??
> (using PHP)
> thanks.
> payam
>
>
>