Hey,
I was wondering if anyone could point me in the right direction of a nice tutorial on password protection using PHP?
Thanks
if ( isset( $_POST['pass'] ) ) { $pass = $_POST['pass']; if ( $pass == "foo" ) { echo "Welcome."; } else { echo "Password wrong."; } } else { echo" <form action='this_script.php' method='post'> <input name='pass' type='password'><br> <input type='submit' value='submit'><br> </form> "; }
Heh, start from there.
That's a start, thanks, but it really teaches me nothing.
I'm here to learn!
use md5:
if ($pass='21232f297a57a5a743894a0e4a801fc3') print "OK"; else print "Not OK";
password would be "admin"
Sorry, my mistake. Conditional should be: if (md5($pass)=='21232f297a57a5a743894a0e4a801fc3') then... 🙂 🙂
There no nice tutorial you can point out?
my recommendation is Foundation dreamweaver MX. Although this is based around dreamweaver it has a very good tutorial on admin logins and other php stuff.
go to google an type in php tutorials security etc
u'd b surprised at what u can find there