User Session

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
phppick
Forum Commoner
Posts: 57
Joined: Thu Aug 14, 2003 5:59 am

User Session

Post by phppick »

Hi I am taking username into a session variable after successful login to my project..

How can i check that session variable is valid or not in other pages..

in order to restrict users to key in directly in address bar like

http://localhost/myapplication/project.php

Got Hope?
User avatar
phpcoder
Forum Contributor
Posts: 158
Joined: Sat Nov 02, 2002 1:18 pm
Location: Manchester, UK

Post by phpcoder »

On the start of every page check wether session is set or not , isset() , if it is set then it means user is valid , if not then user is not valid so u can direct user to loging page .
Post Reply