I think I’ve got it. I’ve removed all the requests and did some other tweaks and the username is now displayed in the welcome message. This is how I have set the session :
$_SESSION['UserName'] = $UserName; $message = "Welcome ".$UserName."
I’ve tested the session using :
<?php session_start(); Print_r ($_SESSION); ?>
I can now use that session in every page provided I add session_start(); ?
Also do I need session_start(); on the page in which I first create the session?