/first check the length of the password ($pass) that the user entered /
if (strlen($pass) >= 6) {
//if length is correct, run query on database
$server = \"localhost\";
$user = \"****\";
$pass = \"***\";
$db = \"val\";
$connection = mysql_connect($server, $user, $pass) or die (\"Unable to connect to database.\");
//pass is the column containing passwords
$query = \"select from val.val where pass=\'$pass\'\";
/ check if there\'s a match between $pass entered and pass from table /
$result = mysql_db_query($db,$query ,$connection);
$num = mysql_numrows($result);
//if there\'s a match
if ($num != \"0\") {
echo \"<table bgcolor=black><tr><td><font color=red><h1>Thank You!<font color=white> \";
echo \"You\'re now logged in\";
}else{
....
You could also use a simple text file, like the user said before. Then OPEN/READ the file and EXPLODE. Then compare strings.