mvsveena Posted February 28, 2010 Report Share Posted February 28, 2010 (edited) 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 Edited February 28, 2010 by veen Link to comment Share on other sites More sharing options...
jeffman Posted February 28, 2010 Report 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 Report 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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now