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! Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/ 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... Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1305606 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? Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1305629 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. Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1305631 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 Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1305660 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 Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1305703 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. Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1305859 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 Link to comment https://forums.phpfreaks.com/topic/254611-login-tutorial/#findComment-1306064 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.