mendi Posted March 8, 2015 Share Posted March 8, 2015 Hi, I am very beginner to php html programming, I have a website where after successful login, i am showing the My Account page but i don not know how to show Welcome username in the html, User logins with Username and password after that I want My account page is opened (using header) and it show the username on the page and he or she could products in the card and checkout. Could some one help with some code or where can i refer some sample code. Thanks Quote Link to comment Share on other sites More sharing options...
tryingtolearn Posted March 8, 2015 Share Posted March 8, 2015 If you are storing the username in a session after a successful login On our account page add echo'Welcome'; if (isset($_SESSION['username'])){ echo", {$_SESSION['username']}"; } changing username to whatever you are storing username as. Quote Link to comment Share on other sites More sharing options...
mendi Posted March 8, 2015 Author Share Posted March 8, 2015 Thanks. but how could i use css on echo output so that Welcome Username should appear at correct place on my html page. Quote Link to comment Share on other sites More sharing options...
tryingtolearn Posted March 8, 2015 Share Posted March 8, 2015 Hard to tell since you didn't post any code so I dont know how your page is laid out. I wouldn't use css to do that, I'd simply add that block of code where you want the username to appear. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.