Home › Forums › Back End › Session Confusion › Reply To: Session Confusion
January 10, 2014 at 2:39 pm
#160099
Participant
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?