I assume you are using this line of code <CFIF getUserName.RecordCount IS 1> to check if the login user and pwd was successful, however, getUserName is not the name of the query you have for checking that. "login" is what you named that query, so it should say <CFIF login.RecordCount IS 1> instead. Try that before debugging the rest of the code.