You sure can do that ... you just just have to figure out your logical AND|OR's ... primary keys are typically hidden from the end user, you use these for performing updates or in JOINs from parent to child tables.

For the login ... you have to check for the password post form variable if it is not there ... meaning someone went directly to the process page ... you should redirect to an error page, or back to the login page & present the user with some message.

Use an if statement around your processing logic for the password lookup.


[Linked Image from w3.the-kgb.com][Linked Image from w3.the-kgb.com][Linked Image from w3.the-kgb.com]