Reputation: 101
Session on page 1:
<?php
session_start('seguimento');
$_SESSION['seguimento'] = 'lojas';
?>
Session on page 2:
<?php
session_start('seguimento');
if($_SESSION['seguimento']!=='lojas'){
echo 'some html code'
}
else{
echo 'another html code'
}
?>
I tried to use this to show 'some html code' when the session is LOJA
and show 'another html' when it's empty. The session works on IE, chrome, opera and safari, but not on firefox.
Anyone know what's happening?
Upvotes: 2
Views: 2132
Reputation: 4291
Check your server's date setting. Check your computer's date setting. If your server date and time settings are off, PHP could be setting the session cookie in the past, thus deleting the session cookie. Firefox is more sensitive to this. IE is not. This has happened to me several times in the past. Is this part of some sort of Content Management System?
Upvotes: 1