I have a password validation page thet redirects user who introduced right pass and user to another page with the following code on top:
<?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'] desappears.
Why it doesn't remain?