I have a sessions problem that seems so simple but I can't find the answer to it anywhere! Its driving me nuts!
I have a more complicated project with sessions which isn't working so I tried just to make a simple sessions script to see if it works and it doesn't.
This is the first page, named test.php:
<?php
session_start();
$_SESSION['test'] = "Hey!";
?><html>
<head>
<title>Test 1</title>
</head>
<body>
<a href="test2.php">Test 2</a>
</body>
</html>
Its linked to the second page, test2.php:
<?php session_start(); ?><html>
<head>
<title>Test 2</title>
</head>
<body>
<?php echo $_SESSION['test']; ?>
</body>
</html>
When I click on the link to go to test2.php the registered variable doesn't echo! why the hell not!???!!
I have sessions turned on in my php.ini file and have set a temp directory at c:\windows\temp.
I can even see the cooke in the temp directory!
I am running PHP 4.2.3 with Apache on Windows ME.
Thanx
Please Help
~ceavou~