I want to create a login which a user can access multiple secure pages... eg.
login.php - the login form - sets cookie/session
admin.php - secure file
account.php - secure file
chat.php - secure file
billing.php - secure file
logout.php - destroys cookie/session
the username and password for each user is in a database, that i can handle. But I want to know which is more secure or better to use for creating a login.
Each secure page will call the cookie or session in the very beginning to see if the user is still authencated.
The thing is, I need the session or cookie to expire after 1 hour. I know how to use cookies, so that's not a problem. But sessions are stored on the server, so I thought that woudl be a more secure way.
Please give me some advice on what to do. I know how to code things, I just need to know what's perferred. -
Also can you store multiple values in a session like you can with a cookie?
I need to store $username and $password
setcookie ("admin[username]");
setcookie ("admin[password]");
Thanks in advanced,
Mark