PDA

View Full Version : Members area


Tjobbe
November 30th, 2004, 16:19
Following on from my two other posts, I now have a fully functional, all singing and dancing login script, with a registration form that records all the users data, and a display page that shows all the users data on request - smashing!

All I want to know now, is do I have to have:


<? session_start() ?>


on EVERY page within my site, when only a few pages are accessible to members.

for example, I have a catalogue web site, and a few pages with extra stuff on for members. if a user goes to a page oputside the members section, but remains on the site, would they have to logout for their session to dissapear?

hope this is making sense!

sonicgroup
November 30th, 2004, 16:42
It depends on how you use the session. If you're using the session strictly to see if the user has access to the specific page it's on, then no, you wouldn't need it on every page, only those that require the login.

Tjobbe
November 30th, 2004, 16:44
i get it, thanks very much!