Creating a login HELP

So I’m creating a login that works in conjunction with ASP and an Access database. Currently the way it works without the database is there’s three fields:

USERNAME
PASSWORD
PATH

and a submit button. The submit_btn has the following code attached to it:


on (press) {
var username
var mypassword
var path
if (username === “bill@ca” and mypassword === “27246”){
path = “/Folders/469”;
getURL(“https://www.mydomain.com/Folders/login.asp”, “”, “POST”);
}
else if (username === “marc” and mypassword === “dumb”) {
path = “/Folders/marc”;
getURL(“https://www.mydomain.com/Folders/login.asp”, “”, “POST”);
}

//Plus 50 more logins

else if (username != “marc” and mypassword != “aurelis”)
gotoAndPlay(“wrong”)
}


Once submited the KEY value of the path is passed to the asp page to list the contents of the folder that belongs to the user.

So, what I would like is instead of having a line of code for every user I want to be able to access the dynamic ASP page, is maybe two or three lines that would call or verify the information to a database, pull the path value and POST it to the login.asp page.

PLEASE HELP! I’ve tried a dozen things, and looked been through many tutorials, and nothing works even close to what I currently have.