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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.