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
https://forums.phpfreaks.com/topic/129989-login-form-posting-logic/
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?

 

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.