[PHP] More secure p...
 
Notifications
Clear all

[PHP] More secure password storing


dmax
Posts: 3
 dmax
Topic starter
(@dmax)
New RivalGamer
Joined: 8 years ago

Most people when hashing password's in PHP use the md5() function, which is now considered highly insecure. I'll show you a way to hash password's and it takes about the same amount of time as using md5(). This function is called password_hash(), and to verify the password's you will use password_verify(). I don't recommend copying my form section, as it could leave vulnerabilities in your site, you may want to research creating safe forms.

First, we have to get the users password via HTML form, considering you're familiar with HTML forms and sending users input to PHP. Then we will echo the entered password hashed. There's two constants I'll show that you can use when hashing your password.

	
	
	
	
	   
	   
	

Any questions, just ask.

Reply
Name of the Video Game, and any other Tags
1 Reply
I Like Women
Posts: 1005
(@I Like Women)
Noble RivalGamer
Joined: 9 years ago

If I ever happen to learn PHP for website, this might be useful =).

Reply