# MX : Passing Variables to Command String

**URL:** <https://forum.kirupa.com/t/mx-passing-variables-to-command-string/106557>\
**Category:** Uncategorized\
**Created:** [April 6, 2004, 11:14pm UTC](https://forum.kirupa.com/t/mx-passing-variables-to-command-string/106557 "2004-04-06T23:14:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![geophurry](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/geophurry/32/244_2.png) [@geophurry](https://forum.kirupa.com/u/geophurry)\
**Post date:** [April 6, 2004, 11:14pm UTC](https://forum.kirupa.com/t/mx-passing-variables-to-command-string/106557/1 "2004-04-06T23:14:10Z")

</div>

I’m trying to design an interface that to simplify the construction of a string. Here’s an example: My output (using the getURL command) needs to be in the form of:

[http://fakesite.com:8080/java/submitdata.jsp?thing1=x&thing2=y&thing3=z](http://fakesite.com:8080/java/submitdata.jsp?thing1=x&thing2=y&thing3=z)

I’m able to define variables for x, y, and z, however I am unable to figure out how to substitute the defined values for those variables into the string when it is time to send it.

I may not be being very clear here, but does anyone have any ideas?

Thanks

Jeff Kirsch

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 6, 2004, 11:18pm UTC](https://forum.kirupa.com/t/mx-passing-variables-to-command-string/106557/2 "2004-04-06T23:18:27Z")

</div>

You should use loadVars for this.

```php

things = new LoadVars();
things.thing1 = "x";
things.thing2 = "y";
things.thing3 = "z";
things.send("fake.jsp", "_blank", GET);

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 7, 2004, 4:09pm UTC](https://forum.kirupa.com/t/mx-passing-variables-to-command-string/106557/3 "2004-04-07T16:09:35Z")

</div>

I think I understand this script, but does it have to be used locally? I don’t have access to the server I’m sending the data to, other than to submit said data. So, I need to send the entire string, including the “[fakesite.com/8080/java/](http://fakesite.com/8080/java/)” part, changing just those few variables. Can I use the same actionsscript for that purpose?
