I was learning sessions this week, and everything was working perfectly on my local host (using xampp) but when I upload the files to my online host (hosted by one.com), the session variables are not being saved.
I made a very simple test-case:
The first php file that links to the second.
[php]
<?php echo $_SESSION['test']; ?>
[/php]The second php file that also links back to the first.
[php]
<?php echo $_SESSION['test']; ?>
[/php]By visiting the first page I expect to set the variable [tt]$_SESSION[‘test’][/tt],
then when I visit the second page through the link, the variable would still be there.
On my localhost both page output the link and the paragraph,
on my online host, the second page only outputs the link…