# Sending vars to a php-file problems?

**URL:** <https://forum.kirupa.com/t/sending-vars-to-a-php-file-problems/24579>\
**Category:** Uncategorized\
**Created:** [July 2, 2003, 11:43am UTC](https://forum.kirupa.com/t/sending-vars-to-a-php-file-problems/24579 "2003-07-02T11:43:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![keitai](https://avatars.discourse-cdn.com/v4/letter/k/73ab20/32.png) [@keitai](https://forum.kirupa.com/u/keitai)\
**Post date:** [July 2, 2003, 11:43am UTC](https://forum.kirupa.com/t/sending-vars-to-a-php-file-problems/24579/1 "2003-07-02T11:43:25Z")

</div>

Hi there,

I don’t get this. I am using the follwing actionscript to send 2 vars to a php file:

```auto

getURL ("file.php?name1=" + name1+ "&name2=" +name2, "_self", "POST");

```

.but when i test it local. I see the following:  
“file.php?name1=david&name2=posh?M%5FloveMatch=%5Btype+Function%5D&calculateScore=%5Btype+Function%5D&your%5Fname%5Fstatic=dfjkawef&your%5Floveone%5Fstatic=oiaSDV&score=78&scoretext=78%25&name1=david&name2=posh”

and all i wanna get is:

“name1=david&name2=posh”

Any thoughts,

Keitai

---

<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:** [July 2, 2003, 2:47pm UTC](https://forum.kirupa.com/t/sending-vars-to-a-php-file-problems/24579/2 "2003-07-02T14:47:41Z")

</div>

Try using LoadVars Instead.

“name1=david&name2=posh”

The way you above is accomplished by using the ‘GET’ method rather than ‘POST’.

```auto
lv = new LoadVars();
lv.name1 = name1
lv.name2 = name2
lv.send("file.php", "_self", "GET");

```
