By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

Session variable doesn't seem to exsist when I uses include

P: n/a
Hello

I have some variables stored in $_SESSION supr global.

I have a script that uses an include statement to run another script, but
however the included script can not recall the $_SESSION variables from the
SESSION.

Can anyone tell me why and a way to sort it out?

Thank you very much
Chris Hall
Jul 17 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Chris Hall wrote:
I have a script that uses an include statement to run another script, but
however the included script can not recall the $_SESSION variables from the
SESSION.

Can anyone tell me why and a way to sort it out?


Maybe you have the statement order wrong

WRONG RIGHT
include 'another_script.php'; session_start();
session_start(); include 'another_script.php';

--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address>)
may bypass my spam filter. If it does, I may reply from another address!
Jul 17 '05 #2

P: n/a
Chris Hall wrote:
Hello

I have some variables stored in $_SESSION supr global.

I have a script that uses an include statement to run another script,
but however the included script can not recall the $_SESSION
variables from the SESSION.

Can anyone tell me why and a way to sort it out?


Yes.

- Virgil
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.