View Single Post
  #2 (permalink)
Old 21st July 2008, 01:10 PM
kidakaka
CEan - Value Adder
 
kidakaka's Avatar
 
Join Date: 18th October 2006
Location: Mumbai, Hyderabad
I'm a Crazy Computer Science Engineer
Posts: 472
Send a message via AIM to kidakaka Send a message via MSN to kidakaka Send a message via Yahoo to kidakaka Send a message via Skype™ to kidakaka
Default Re: security using session variables

Hi hbk,

Obviously, you are on the first step to making a XAMP based web application. Welcome

A quick and dirty method is to have a authentication mechanism in b.php, which will check for the username and password submitted in form of a.php. Once the user is authenticated, then you can set a session variable userid = <user_id>.

Now, every page after the authentication takes place, you need to check one thing, <user_id> is present in session or not. If it is, then the user is authenticated, if it isnt, then the user is not authenticated (redirect to login).

Kapische?
kidakaka is offline   Reply With Quote