I am not new to php, but am new to using sessions. I was trying to get sessions working between files with 2 simple test files, 'test1.php' and 'test2.php'.
test1.php:
Code: Select all
<?php
session_start();
$_SESSION['data'] = "you have an active session!";
echo "<a href=\"test2.php\">go</a>";
echo " and please pass this: " . $_SESSION['data'];
?>Code: Select all
<?php
session_start();
echo $_SESSION['data'];To confirm that it's some type of configuration issue I tried it on another webserver and it did work with the exact same files. So what kind of configuration issue should I look into? Or what obvious answer did I miss? Thanks in advance.
I apologize in advance if I missed a sticky or other easily searchable post that had my answer. I searched the forums and couldn't find anything.