limitphp Posted October 24, 2008 Share Posted October 24, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/129989-login-form-posting-logic/ Share on other sites More sharing options...
DeanWhitehouse Posted October 24, 2008 Share Posted October 24, 2008 I would use post, i prefer it to using get for login's. Also , i assume you are using a HTML generator <FORM NAME="login" METHOD="post" ACTION="login.php?mode=1"> Should be <form name="login" method="post" action="login.php?mode=1"> Quote Link to comment https://forums.phpfreaks.com/topic/129989-login-form-posting-logic/#findComment-673918 Share on other sites More sharing options...
limitphp Posted October 24, 2008 Author Share Posted October 24, 2008 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? Quote Link to comment https://forums.phpfreaks.com/topic/129989-login-form-posting-logic/#findComment-673942 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.