First of all, you should create a form with at least two input fields (username, password) and a Submit button.
<input type="text name="username">
<input type="password" name="password">
If Submit button is pressed (it has a name, so you can refer to that), then there should be a query processed like this:
$query = "select * from password_table where
user = '$username' and
pass ='$password'" ;
That's the basic idea. Hopes this helps.
Bye, Akos