# Passing variables problem

**URL:** <https://forum.kirupa.com/t/passing-variables-problem/316299>\
**Category:** Uncategorized\
**Created:** [November 18, 2010, 1:02am UTC](https://forum.kirupa.com/t/passing-variables-problem/316299 "2010-11-18T01:02:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![garakatsamol](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@garakatsamol](https://forum.kirupa.com/u/garakatsamol)\
**Post date:** [November 18, 2010, 1:02am UTC](https://forum.kirupa.com/t/passing-variables-problem/316299/1 "2010-11-18T01:02:28Z")

</div>

Hi all,  
I try to make a simple login. I use the code

```auto

function sendVars_login(event:MouseEvent):void
{
    var scriptRequest_login:URLRequest = new URLRequest("http:// ******.aspx");
    var scriptLoader_login:URLLoader = new URLLoader();
    var scriptVars_login:URLVariables = new URLVariables();
    scriptLoader_login.addEventListener(Event.COMPLETE, handleLoadSuccessful_login);
    scriptLoader_login.addEventListener(IOErrorEvent.IO_ERROR, handleLoadError_login);
    scriptLoader_login.dataFormat = URLLoaderDataFormat.TEXT;
    var email:String = email_txt.text;

    var pass:String = pass_txt.text;
    scriptVars_login.u_pass = pass  
    scriptVars_login.u_email =email
    scriptRequest_login.method = URLRequestMethod.POST;
    scriptRequest_login.data = scriptVars_login;
    scriptLoader_login.load(scriptRequest_login);
}

```

when i send the vars i get back that user doesn’t exists although i have checked that it exists.  
A funny thing is that when i change the following

```auto
scriptVars_login.u_pass = "somePass"
scriptVars_login.u_email ="someEmail"

```

I get correct results. So the .aspx script works and the way i’m sending the variable works.

when i trace  
scriptRequest\_login.data  
i get a url encoded string, so i tried to unescape the value

```auto

var unescapedString = unescape(String(scriptVars_login));
scriptRequest_login.data = unescapedString;
scriptLoader_login.load(scriptRequest_login);

```

now when i trace(scriptRequest\_login.data) i get an unescaped value but it still doesn’t work

Any suggestions would be very helpfull.  
Thanx in advance
