+ 13

How to make a login form using html,php and mysql.. Please help me anybody...!

I want to create a login from in my website. So please anyone help me.....!

16th Nov 2017, 1:11 PM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
8 Respuestas
+ 6
Create a database/table in MySQL for your website user accounts. At the bare minimum, have an ID (unique), username, and password field in the table. You'll want to create a form to receive input from the user, this will be the login box/screen/modal/whatever. The form will send the data over to your PHP script, which will search the table for the username and check the password against it. In your SQL, encrypt the password using something like MD5 (you do NOT want to store plain text passwords in your database) and compare the password against the one stored in the user record from the table. If the two hash passwords match, then log the user in and do whatever initial processes you want for logged in users.
16th Nov 2017, 2:51 PM
AgentSmith
+ 8
Thanks for your information @Netkos Ent
16th Nov 2017, 2:55 PM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 4
And dont forget to prevent SQL Injections :) i would recommend to Hash your Password to SHA256 and Salt it. So its too Hard to encrypt it, when he don't have the Salt Key
17th Nov 2017, 10:56 AM
Thomas Meejumlong
Thomas Meejumlong - avatar
+ 4
😂😂 I posted this when I was a kid Mark.exe 😁 😂😂
3rd Apr 2019, 5:15 AM
Arb Rahim Badsa
Arb Rahim Badsa - avatar
+ 2
Try to do your own code and ask about your doubts. You need HTML form and checking by PHP against MYSQL. PHP must to SELECT users from database to find first user and next compare password. For that comparison you must to think if you have password saved encripted, nowadays is best to encrypt it (md5, sha, ...)
16th Nov 2017, 1:36 PM
Daniel
Daniel - avatar
+ 2
This my favorite pastime 🤣 look into learning the php framework laravel and front end framework vue.js you will be so glad you did !!! You can simply install an auth package in seconds . Happy coding
3rd Apr 2019, 5:08 AM
Mark.exe
Mark.exe - avatar
+ 1
Arb Rahim Badsa hahahahaha makes sense now
3rd Apr 2019, 5:16 AM
Mark.exe
Mark.exe - avatar
0
I'm Germany
25th Nov 2017, 9:39 PM
malle_PrimeXD