Current location: Hot Scripts Forums » Programming Languages » PHP » Sessions help!


Sessions help!

Reply
  #1 (permalink)  
Old 07-22-10, 09:13 PM
phphelpme phphelpme is offline
Newbie Coder
 
Join Date: Jul 2010
Posts: 84
Thanks: 10
Thanked 0 Times in 0 Posts
Hazard Sessions help!

hey everyone i need some help with sessions , when i go to the home page and it says login i login and it works , it takes me to the page where im supposed to go , but when i go back to the home page it makes me login again .. also when i go to the page i was logging in to go to it is unprotected please help me!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-23-10, 01:04 AM
job0107's Avatar
job0107 job0107 is offline
Community Liaison
 
Join Date: Dec 2006
Location: Tacoma, Washington USA
Posts: 3,454
Thanks: 0
Thanked 140 Times in 137 Posts
On your home page, your not checking your session variables to see if you are already logged in.
And once you have logged in, there will be values stored in your session variables.
So as long as you keep the session open, when you go back to the page where you are supposed to go after logging in, you will still be logged in until you end the session.

Generally, once you close the browser, the current session will end.

You can secure your session variables if you unset them after you login.
But then you will have to login every time you go back to the home page.
Also if you unset the session variables after you login, and then refresh the page, you will no longer be logged in.

You might want to read this article: Notes on PHP Session Security
__________________
Jerry Broughton
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
The Following User Says Thank You to job0107 For This Useful Post:
mysamsung (07-23-10)
  #3 (permalink)  
Old 07-23-10, 04:50 AM
mysamsung mysamsung is offline
Newbie Coder
 
Join Date: Apr 2010
Posts: 22
Thanks: 36
Thanked 0 Times in 0 Posts
thank you i was searching for this
__________________
PHP
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks

Tags
mysql, php, php scripts, php sessions, sessions


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
secure login without sessions or cookies vinpkl PHP 1 05-21-10 09:10 AM
PHP Sessions Question End User PHP 16 01-16-10 01:54 PM
sessions not working, please help! tallpaul858 PHP 2 04-29-05 07:23 AM
Multiple sessions Kaanha PHP 2 01-16-04 11:39 AM


All times are GMT -5. The time now is 11:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.