Something like this may work:
FORM: - auth.php
<form name="auth" action="auth2.php" method="post">
Username: <input type="text" name="uname"><br>
Password: <input type="text" name="pword"><br>
<input type="submit" name=submit" value="submit">
AUTH PAGE: - auth2.php
$db = mysql_connect("localhost", "root");
mysql_select_db("databasename",$db);
$auth_sql = "SELECT username, password FROM auth WHERE username = '$uname' AND password = 'pword'";
$auth_qry = mysql_query($auth_sql, $db);
while ($row = mysql_fetch_array($auth_qry)) {
if (isset($row["username"]) {
$userfound = "yes";
}
}
if (isset($userfound)) {
echo "user found";
} else {
echo "user not found";
}
p.s. I just typed this in - you may find a typo or two.
good luck.