General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old March 26th, 2004, 11:07 AM
Faxanadu ELC Faxanadu ELC is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2004
Posts: 1 Faxanadu ELC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
$_SESSION questions

After setting variables with the $_SESSION array and redirecting the user to another page, I tried checking for the existence of the variables I set, but it was as if I had never initialized them. Then, after looking at some threads here I noticed them using session_start() before accessing the session variables.

I was mistakenly under the impression that you only used the session_start() function to actually begin the session, but after reading php.net's description of it, I realized it also makes session variables available to the current script.

Is checking if a session variable is set a good way to see if a user is logged in? Should I do anything in addition for added security? I'm currently also recording the session id and ip address into a mysql db for additional verification, but since I have limited experience, I was wondering if that is actually useful, or if it's just overkill.

Also, I was wondering how the session variables are stored. I am currently using the 'only use cookies' setting, and I was just curious about how it is actually accessed. Are all of the variables stored in the cookie, or is it just the session id, which is then used to access the variables from a server-side cache?

Thanks for the helpful site, I've been teaching myself web development techniques using this and other similar sites, and appreciate the generosity of knowledge and experience that I get for nothing more than my time.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > $_SESSION questions


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap