Basically i store their username when they log in and want their control panel to say Hello welcome back [username goes here].
But for some reason i can't get it to work.
This is the code i am using.
(To see if the have logged in i use a variable).
Before you ask me to check the variable, if i use this code it returns the message (Welcome back Scott).Code:<? If ($_SESSION[login]=1){ print($_SESSION[user]); } else { echo 'Not logged in'; } ?>
Any help would be appreciated.Code:<? If ($_SESSION[user]=Scott){ print('Welcome back Scott'); } else { echo 'Not logged in as Scott'; } ?>




Reply With Quote