Session Variables PHP5

software development

#1

I’ve got two .php pages running under PHP5; one of them creates a session variable, and the other one tries to read it.

When I run TestSession1.php, I’m redirected to TestSession2.php, and see the session ID and the text x2, but no value for $_Session[“Dummy”].
I’ve tried all the ideas in the PHP Manual, but still no joy.
Any thoughts?

TestSession1.php:

<?php session_start(); $_SESSION['Dummy']="Dummy"; header('Location:TestSession2.php'); ?>

TestSession2.php:

<?php session_start(); echo session_id(); echo $_Session['Dummy']; echo 'x2'; echo ' '; ?>

#2

try $_SESSION – constants are case-sensitive.


#3

Hallelujah!

It works!

Many, many thanks!