Login Form Using AS and ASP

I’ve been scouring the net for code to create a login form in flash, that uses ASP to check a database and react to the credentials.

This is what I have so far.

Code in the onRelease of the login button

login_lv.si = sid_txt.text;
login_lv.un = username_txt.text;
login_lv.pw = password_txt.text;
login_lv.sendAndLoad(“login.asp”, login_lv, “POST”);

Then a function on a actions layer

login_lv = new LoadVars();
if(this.userInfo == “true”){
errorMsg = “Welcome”;
errorMsg = “Unknown User”;
sid_txt.text = “”;
username_txt.text = “”;
password_txt.text = “”;

Errormsg is a test text field for displaying messages.

OK, the form works perfect for the first time you log in with the correct id and password.

If you type an incorrect id and password you get the “Unknown User” message. However, the form will then fail for all correct log in attempts.

You have to delete the .swf from Temp Inet folder before the form will work again.

This is driving me mad. Hope this is clear.

Many Thanks