Function function

greetings. I posted this problem yesterday and thought it was solved. unfortunately I was having some issues on where it was going on release. could someone please take a look and offer some advise. this script will, once working be able to take in multiple passwords and avoide the php bundle for non php people, who want to password protect certain parts of there site.

(although i do recomend to all learning both ways) this is just another in case your hosting does not support PHP

thank you for the help, i have included the flash file.

////////////script//////////////

enter.onPress=function(){
checkPassword(pwd) (password);
}

/////////function/////////////////
var passwords:Array = new Array();
var userPages:Array = new Array();
//////////Array///////////////////
passwords[0] = “0pt1mum06”;
userPages[0]=“managers_page.htm”, “txt”;
passwords[1] = “test”;
userPages[1]=“test.htm”, “txt”;
//////passwords and desitnations///
function checkPassword(pwd) {
for (p=0; p<passwords.length; p++) {
if (pwd == passwords[p]) {
inputStatus = “Access granted!”;
getURL(userPages[p]);
} else {
inputStatus = “Access Denied!”;
getURL(“error.htm”, “txt”);
}
}
}