Page 2 of 2

Posted: Wed Oct 08, 2003 10:37 am
by itsmani1
Example : if you are using post method

Code: Select all

PHP: 

<?php 
$enteredPass = $_POST&#1111;'password']; 
// Check to see if input was entered in the password field here 
$correctPass = md5('CORRECTPASSHERE'); 
if (md5($enteredPass) == $correctPass) 
&#123; 
  echo 'Authenticated.'; 
&#125; 
else 
&#123; 
  echo 'Not Authenticated.'; 
&#125; ?>


Abdul Mannan

Posted: Wed Oct 08, 2003 2:31 pm
by dmcglone
Nay wrote:You mean when you match it with the password that was already encrypted, you don't get a match and it doesn't authenticate?

-Nay
I figured the problem out, I needed to post the password coming from the form as md5 instead of plain text.

I finally grasped the concept of all this and now i've altered most of the code and hooked it up to a database :)

So now I want to take back all my whinning from earlier, because things are starting to get clear in my clouded head. 8O