mvsveena Posted February 28, 2010 Share Posted February 28, 2010 Hi All,I have a form[login.php] where user enters his user id (in this case its mail id) and pwd, then clicks the login(submit) button. My code goes to database mySQL and checks whether such a user exist and whether the password matches. Its all working fine, now I have to welcome the user who logged in.I have created 5 pages like home[home.html], faqs[faqs.html], contact us[contact.html], login[login.php] ,new user[newuser.php]. And now when the user is logged in, I need to show a text 'Welcome <username>' in all the 5 pages. How do I pass the text 'Welcome <username>' to each and every page.Do I need to use cookies...Appreciate your help and thanks in advance.-veen Link to comment Share on other sites More sharing options...
jeffman Posted February 28, 2010 Share Posted February 28, 2010 You could. But PHP has a technique, called sessions, that does all that work for you. It's incredibly easy to use. Link to comment Share on other sites More sharing options...
mvsveena Posted March 1, 2010 Author Share Posted March 1, 2010 Hi,Thanks for your inputs. I changed all my .html files to .php files, used session's and its working fine. Thanks for your time.... - veen Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.