# Its not sending vars to php file? grrrr

**URL:** <https://forum.kirupa.com/t/its-not-sending-vars-to-php-file-grrrr/22953>\
**Category:** Uncategorized\
**Created:** [June 11, 2003, 12:38am UTC](https://forum.kirupa.com/t/its-not-sending-vars-to-php-file-grrrr/22953 "2003-06-11T00:38:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![brooklyniteOne](https://avatars.discourse-cdn.com/v4/letter/b/8dc957/32.png) [@brooklyniteOne](https://forum.kirupa.com/u/brooklyniteOne)\
**Post date:** [June 11, 2003, 12:38am UTC](https://forum.kirupa.com/t/its-not-sending-vars-to-php-file-grrrr/22953/1 "2003-06-11T00:38:49Z")

</div>

I have this tetris game that i am trying to send the vars ( lines cleared, username, and password) to a php file for processing but i guess im coding the actionscript wrong.

I have this in the root:

```auto
_root.add_pass = "{password}";
	_root.name = _root.Loser.username;
	_root.score = _root.lines_cleared;
stop();

```

And the following in a “loser” movie clip thgat appears after a game when the user can input their name for the score to be saved.

```auto
submit1.onPress = function () {
	getURL("new_score.php", "_blank", "POST");
}
stop();

```

Its supposed to POST the vars to the php file on submit.

what am I doing wrong?

The “game” movie clip contains most of the scripts. Is it necessary to add that movie clip after \_root in the code above?

heres a link to the source:

[http://www.hotphish.net/new\_tetris.fla](http://www.hotphish.net/new_tetris.fla)

---

<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:** [June 11, 2003, 5:40am UTC](https://forum.kirupa.com/t/its-not-sending-vars-to-php-file-grrrr/22953/2 "2003-06-11T05:40:59Z")

</div>

probably has to do with global vars being turned off. Its a PHP problem, not a Flash problem… check out this thread:

[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17604)

See how, the first 3 lines of the PHP file I use the $\_POST[’’]; array to grab the variables? You have to do that with each of your variables in the Flash file and it should work just fine.

---

<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:** [June 11, 2003, 2:34pm UTC](https://forum.kirupa.com/t/its-not-sending-vars-to-php-file-grrrr/22953/3 "2003-06-11T14:34:24Z")

</div>

yup you were right the flash actionscript was coded right but the php file was missing that info and now it works! yay! LOL
