How can I get this to work?

on (release)
{
if(userName.length > 0 && userPassword.length > 0)
{
myVars = new LoadVars();
myVars.username = userName
myVars.password = userPassword
myVars.action = ‘frmLogin’;
myVars.sendAndLoad(library/login.php, myVars, ‘POST’);
myVars.onLoad = function()
{
if(!this.error && this.user > 0)
{
getUrl(‘home.php’);
} else {
getUrl(‘signup.html’);
}
userName.selectable = true;
userPassword.selectable = true;
loginButton.enabled = true;
}
userName.selectable = false;
userPassword.selectable = false;
loginButton.enabled = false;
}
}

I had more success with the above script. when i typed in a username/password, and click submit, it atleast sent me to the page signup.html, but it isnt checking the php file to see if the password/username is right.