I’m basically trying to re-create a HTML link in flash that will allow me to log in to my forums. Here’s the HTML version:
<form action="blah.com/forums/ucp.php?mode=login" method="post">
<fieldset>
<label for="username">Username:</label>
<input type="text" name="username" id="username" size="10" title="Username" />
<label for="password">Password:</label>
<input type="password" name="password" id="password" size="10" title="Password" />
<input type="submit" name="login" value="Login" />
</fieldset>
</form>
and the AS3 version:
var req:URLRequest = new URLRequest("http://blah.com/forums/ucp.php?mode=login");
var vars:URLVariables = new URLVariables();
vars.username = USERNAMESTRING;
vars.password = PASSWORDSTRING;
req.data = vars;
req.method = URLRequestMethod.POST;
navigateToURL(req);
It successfully loads the new page but the login doesn’t go through, any ideas?