# Here's a wierd one

**URL:** <https://forum.kirupa.com/t/heres-a-wierd-one/209910>\
**Category:** Uncategorized\
**Created:** [December 13, 2006, 9:03am UTC](https://forum.kirupa.com/t/heres-a-wierd-one/209910 "2006-12-13T09:03:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![worthyashes](https://avatars.discourse-cdn.com/v4/letter/w/87869e/32.png) [@worthyashes](https://forum.kirupa.com/u/worthyashes)\
**Post date:** [December 13, 2006, 9:03am UTC](https://forum.kirupa.com/t/heres-a-wierd-one/209910/1 "2006-12-13T09:03:17Z")

</div>

Hi guys,

I had a wierd one and I’m not sure if anyone else has come across this - or if I’m just being a muppet.

I wanted to send some variables to a php file. Easy enough

var lv:LoadVars = new LoadVars();

lv.dataOne = “Data one”;  
lv.dataTwo = “Data two”;

lv.send (“myfile.php”);

It didn’t work.

I tried a few different variations and then thought, lets do a send an load for testing.

var lv:LoadVars = new LoadVars();  
var test:LoadVars = new LoadVars();

lv.dataOne = “Data one”;  
lv.dataTwo = “Data two”;

lv.sendAndLoad (“myfile.php”,test);

test.onload = function () {

```
      trace ("It's finally worked!!!!");

```

}

Ran it, got the trace and also it hit the php. So why on earth did sendAndLoad work, and not just send? I believed that leaving send with only the file to hit would POST the variables to it? Or for send to work do you HAVE to define a window to open?

I’ve only ever had this situation where I was sending variables only without waiting for a response so I’ve always used sendAndLoad up to now.

As it’s working now it’s not desperately pressing, but I have to confess I’m a bit stumped.
