# POST becoming GET?

**URL:** <https://forum.kirupa.com/t/post-becoming-get/35513>\
**Category:** Uncategorized\
**Created:** [November 14, 2003, 7:55pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513 "2003-11-14T19:55:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voetsjoeba](https://avatars.discourse-cdn.com/v4/letter/v/ac91a4/32.png) [@Voetsjoeba](https://forum.kirupa.com/u/Voetsjoeba)\
**Post date:** [November 14, 2003, 7:55pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513/1 "2003-11-14T19:55:54Z")

</div>

Hey everybody,

I’m having some problems using the send method of the LoadVars object. What I’m trying to do is send a variable to PHP which then ouputs it.

The problem is that I can get it to work using the GET method, but not using the POST method. Using the GET method I used this:

```auto

lv = new LoadVars();
lv.vari = "Variable sent via Flash";
lv.send("http://127.0.0.1/tut.php","_blank","GET");

```

And for the PHP I had:

```php

<?
$receive = $_GET['vari'];
echo $receive;
?>

```

And it worked fine. But it used this URL that displayed the variable so I thought I’d use POST:

```auto

lv = new LoadVars();
lv.vari = "Variable sent via Flash";
lv.send("http://127.0.0.1/tut.php","_blank","POST");

```

```php

<?
$receive = $_POST['vari'];
echo $receive;
?>

```

This _doesn’t_ work. Also, Flash seems to be still using the GET method, because the url it uses is the same as before:

[http://127.0.0.1/tut.php?vari=Variable%20sent%20via%20Flash](http://127.0.0.1/tut.php?vari=Variable%20sent%20via%20Flash)

while the ?vari=… part shouldn’t even be there when using POST, should it ? What’s going wrong here ?

---

<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:** [November 14, 2003, 8:01pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513/2 "2003-11-14T20:01:35Z")

</div>

thats odd. I used that format for one of my websites and it works fine… can’t figure out any typos in ur script. Weird

---

<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:** [November 14, 2003, 8:44pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513/3 "2003-11-14T20:44:36Z")

</div>

Are you running it through the Flash IDE? did you try doing so from a browser? The player in Flash MX had a bug which sent variables through GET even when POST was specified

> POST is used when executed from plug-in or ActiveX embedded in the browser. GET is used when executed from a projector, or the flash authoring environment. (This was for Flash 5. Flash MX always uses POST when you send the XML.)  
> [[LINK](http://chattyfig.figleaf.com/flashcoders-wiki/index.php?XML%20Object%20General) ]

---

<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:** [November 14, 2003, 9:10pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513/4 "2003-11-14T21:10:27Z")

</div>

I was using it from the CTRL+ENTER display. Is that the Flash IDE ? 😛 I’ll try through a browser, thanks Ahmed, some usefull information there =)

---

<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:** [November 14, 2003, 9:13pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513/5 "2003-11-14T21:13:52Z")

</div>

yes, that IS the Flash IDE, or Integrated Development Env., or Program in other words 😛

---

<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:** [November 14, 2003, 9:22pm UTC](https://forum.kirupa.com/t/post-becoming-get/35513/6 "2003-11-14T21:22:46Z")

</div>

Cool, didn’t know that, thanks for the info ahmed =)
