Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

Little md5 question

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Re: Little md5 question

Postby Oleg Butuzov » Thu Jan 02, 2003 4:30 am

Kriz wrote:I have a login-page and used this code before
Code: Select all
if ($user == "admin" && $password == "password"){header("Location: admin.php");}

But now i want to make it more secure. I thought using md5, and my password in md5 is fc6c719000535d3cb73f2f658ef47d92. But how is the php-code gonna look like then?



Code: Select all
if ($user == "admin" && md5($password) == md5("password")){header("Location: admin.php");}
Oleg Butuzov
Last Samuray
Last Samuray
 
Posts: 831
Joined: Sun Jun 02, 2002 3:09 am

Return to PHP coding => General

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.