I can't seem to get the old passwod I added to verify. It only verifys the last entry into the db. Its as if the other password entries don't even exsist. Further more it's only displaying the last encrypted password.
<?
include "db.php";
$name = "admin";
$pass = "admin";
$crypted_pw = crypt ($pass ,$name);
//$sql = mysql_query("INSERT INTo lo (user,pass) VALUES (
//'$name',
//'$crypted_pw')");
$result = mysql_db_query("$dbname","select pass from lo");
while($rows = mysql_fetch_array ($result)) {
if($rows['pass'] == $crypted_pw){
echo $rows ['pass'];
$let = "Access Granted";
}else{
$let = "Access denied";
}
}
echo $let;
?>