# Mimicing a html (POST) call from flash

**URL:** <https://forum.kirupa.com/t/mimicing-a-html-post-call-from-flash/281839>\
**Category:** flash\
**Created:** [February 13, 2009, 6:45pm UTC](https://forum.kirupa.com/t/mimicing-a-html-post-call-from-flash/281839 "2009-02-13T18:45:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![substance](https://avatars.discourse-cdn.com/v4/letter/s/c6cbf5/32.png) [@substance](https://forum.kirupa.com/u/substance)\
**Post date:** [February 13, 2009, 6:45pm UTC](https://forum.kirupa.com/t/mimicing-a-html-post-call-from-flash/281839/1 "2009-02-13T18:45:45Z")

</div>

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:

```php
<form action="blah.com/forums/ucp.php?mode=login" method="post">
    <fieldset>
        <label for="username">Username:</label>&nbsp;
        <input type="text" name="username" id="username" size="10" title="Username" />
        <label for="password">Password:</label>&nbsp;
        <input type="password" name="password" id="password" size="10" title="Password" />
        <input type="submit" name="login" value="Login" />
    </fieldset>
</form>

```

and the AS3 version:

```auto
	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?
