Code: Select all
<?php
//page2
session_start();
if (session_is_registered('user')){
if(!isset($_SESSION['langfixed'])){
$_SESSION['lang']='en';}
}
else{
header("Location: entry.php?baduser=1");Validation works nice, but if I echo $_SESSION['lang'], it will only appear when page is loaded for the first time, if I refresh the page $_SESSION['lang'] disappears.
Why it doesn't remain?