[PHP] Session and redirecting

2002-12-05 Thread Didier McGillis
I'm having some problems with sessions on this project I am doing for this 
one class.  I know what I am doing with sessions on a certain level, as I 
use them with ASP and JSP apps.  I notice that when I do session_start() the 
session SID or PHPSESSID doesnt appear until you refresh that page or go to 
the next page, I need the session to start on index, so do I have to plop a 
refresh statement in there?  And why is it you have to do a session_start() 
on every page, could you put that in a header and have it be the same?

_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Session and redirecting

2002-12-05 Thread 1LT John W. Holmes
 I'm having some problems with sessions on this project I am doing for this
 one class.  I know what I am doing with sessions on a certain level, as I
 use them with ASP and JSP apps.  I notice that when I do session_start()
the
 session SID or PHPSESSID doesnt appear until you refresh that page or go
to
 the next page, I need the session to start on index, so do I have to plop
a
 refresh statement in there?  And why is it you have to do a
session_start()
 on every page, could you put that in a header and have it be the same?

Sure, place it in an include file. Or turn on session.auto_start in php.ini
and you'll never have to call it. Why do you need to refresh. The SID
constant may not be available, but you can use session_id() to get it's
value.

---John Holmes...



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php