Locking a 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
shure
Forum Newbie
Posts: 7
Joined: Fri Mar 14, 2008 10:06 am

Locking a session?

Post by shure »

Hi guys,
For a university project i have to write a feature that acts like a vista lock for a website. The user clicks the lock button on the main page, then it goes to another page when the user has to enter their password to go back to the page originally viewed.

I have researched into sessions, and believe that i will have to take the username from the session on the previous page and store it as a variable, then destroy the session in the lock page. I will then have to re-activate the session.

Please could someone confirm my intents. I am a complete rookie and php, but dont expect anyone to do the code for me, just ask advice.

cheers
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Locking a session?

Post by yacahuma »

what is a vista lock?
shure
Forum Newbie
Posts: 7
Joined: Fri Mar 14, 2008 10:06 am

Re: Locking a session?

Post by shure »

where you click the lock button near the shut down button and it locks your desktop so no one can access your files / use your computer etc
User avatar
yacahuma
Forum Regular
Posts: 870
Joined: Sun Jul 01, 2007 7:11 am

Re: Locking a session?

Post by yacahuma »

you can keep that information on a session. remember sessions will expire. Or you could keep that information in the database. I will keep it on the database if when you lock something, it should be locked no matter which machine you are using. The session is only for one machine, one user.
Post Reply