Jump to content

LOGIN TUTORIAL


mindapolis

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.