|  | Posted by Justin Koivisto on 06/15/92 11:31 
Matt wrote:> Here is my issue.  I've got a new project management system built with
 > php and mysql.  So far it has been only me testing and using it.  Now
 > that I'm actually using it for a project and have a small handfull of
 > users, I'm realizing that the php sessions that I'm using aren't quite
 > working like I hoped.
 >
 > For example, when I am logged in and another user tries to log in they
 > get a server error message "Forbidden...".  I'm assuming that is
 > because somehow I need each user who logs in to have a unique session
 > name, this is where I'm in over my head.  How do i go about assigning
 > session names to different users as they log in?  How do I access that
 > session name and how do I make sure that each user only had access to
 > only their session.
 >
 > Let me know if I need to go into more detail.  Thanks.
 
 You don't want a different session *name* for each user, just a
 different *id*. PHP will assign a unique id (md5 of some sort) to each
 new session automatically when session_start() is called either
 explicitly or implicitly. If you want to find the session ID being used
 for a particular user, just call session_id(). If you want to change
 their session id, call session_regenerate_id() For more info on PHP and
 sessions, be sure to read through the manual a couple times if you are
 having a hard time grasping some of the concepts:
 
 http://us2.php.net/manual/en/ref.session.php
 
 --
 Justin Koivisto, ZCE - justin@koivi.com
 http://koivi.com
  Navigation: [Reply to this message] |