Jump to content

Login - Form Posting Logic


limitphp

Recommended Posts

Ok, I think I've figured out how I'm going to handle where to store the cookie and what to store in the cookie when someone logs into my website.

 

Now for the logic of actually building the login.php page.

I have a form on that page where the user enters a username and password.

 

They click the login button and it tells the form to Post.

<FORM NAME="login" METHOD="post" ACTION="login.php?mode=1">

 

Should I use the method post or get or something else?

 

From then, I use the querystring mode=1 to hit the same page.

If mode=1 I check to make sure the username exists and then display all the stuff I want.

 

Does that sound logical on how to handle a login page?

 

 

I assume, on every page that will display user data, I'll need to get the uniqueID from the cookie and get the userdata from the database.  Should I just make that an include php file?

 

Thanks

I'm using wamp server phpadmin 5.2.6

 

Link to comment
Share on other sites

no, I'm not using an html generator....

I do it all by hand in notepad++.

I usually just copy my old code.

so, lowercase for the tags?

or I forgot what those are called.....

 

Does everything seem logical?

Would you use modes in the same page to handle logins?

 

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.