An Introduction To PHP Sessions
How Do I Change The Value Of A Session Variable?
This is easily achieved by simply declaring the variable again like so. If
page1.php sets the value of
bar, the value can be changed by resetting it like:
$_SESSION['foo'] = 'newbar';
It really is that simple.