I have a login script called login.cgi. Currently I use a HTML form to login. I created a Flash form to use as the login in but when I click on the submit button nothing happens.
ok, i had a closer look at the page that the cgi produces.
the script is looking for a variable “action”. when you call it from flash without setting it, the cgi sees that the variable is null, and gives you the login prompt instead of processing the info.
you’ll have to set the “action” variable to “login”.
you can set that anywhere, but perhaps easiest on the submit button:
on (release) {
action="login";
getURL("http://www.jaycook.net/cgi/members/login.cgi", "_blank", "POST");
}
I think I am a lot closer now. Here is what’s going on. Once you click on the “LOGIN” button, the script reuturns 2 errors.
1 Invalid character in username.
2 No such username / password combination
The variables are not being posted. The script thinks the variables are blank. I read inside the cgi file and “whitespace” will create the “invalid character” error. I can re-create this same error on my original form by not enter a username / password. Form some reason the loadVariables.
whatever variables exist in the movie that the action is initiated form are passed. if you want to be sure that variables are being passed, call this script (this is perl), it will simply print everything that it receives:
uncheck html on your text options, it’s sending the html code as well.
you’ll want to be sure to unencode the keys if you want to use underscores. with the script i posted above, the underscores are not being translated back to underscores, they remain “%5F”. this is * without* escaping the variables first. seems to do it automatically when it POSTS.
see the line that unencodes the $content? just do the same for $key like so:
$key=~s/%(..)/pack("c",hex($1))/ge;
i think that should clear up the problems. you might consider dumping the underscores altogether.