mindapolis Posted January 8, 2012 Share Posted January 8, 2012 hi, I'm trying to find a good login tutorial. Not only do I need to login but I need to be able to display the username 's name, address, etc back on the form. I have tried googling it but I'm not finding a good tutorial that explains how to put information back on the form. if some knows of any good tutorials I would appreciate it. Thanks! Quote Link to comment Share on other sites More sharing options...
Mavent Posted January 8, 2012 Share Posted January 8, 2012 When you say "back on the form", what do you mean, exactly? Do you mean "if the login fails, put the information back into the form"? That's easy enough. In fact, it's almost trivial. Remember that you already HAVE the information- the user gave it to you before they hit Submit. If you're using POST, all you have to do is ask for the information back. For example: $username = $_POST['username']; $password = $_POST['password']; assuming that you named the username and password fields "username" and "password". All you have to do is set the contents of the fields to $username and $password. I hope that helps... Quote Link to comment Share on other sites More sharing options...
mindapolis Posted January 8, 2012 Author Share Posted January 8, 2012 I'm sorry, I mean after a member log in, how can I display their name, address in the check out form they are filling out? Quote Link to comment Share on other sites More sharing options...
scootstah Posted January 8, 2012 Share Posted January 8, 2012 You'll need to store their user id in a session when they login and then retrieve their info when you need it. Quote Link to comment Share on other sites More sharing options...
mindapolis Posted January 9, 2012 Author Share Posted January 9, 2012 thank you so much for that information Quote Link to comment Share on other sites More sharing options...
BluwAngel Posted January 9, 2012 Share Posted January 9, 2012 i used this tutorial, its nice explained with password and protection with md5 Quote Link to comment Share on other sites More sharing options...
stu1040 Posted January 9, 2012 Share Posted January 9, 2012 This one I have found useful. http://www.php-login-script.com/ AND http://www.formtools.org/ Hope this helps you. Quote Link to comment Share on other sites More sharing options...
RobertP Posted January 10, 2012 Share Posted January 10, 2012 i used this tutorial a long time ago, and even looking at it now, it gives me the chills. i love this tutorial. http://phpeasystep.com/phptu/6.html ps: i will add to my signature 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.