# \[php\] Can't get variables into flash

**URL:** <https://forum.kirupa.com/t/php-cant-get-variables-into-flash/106344>\
**Category:** Uncategorized\
**Created:** [April 4, 2004, 10:25pm UTC](https://forum.kirupa.com/t/php-cant-get-variables-into-flash/106344 "2004-04-04T22:25:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thorseye](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thorseye/32/66_2.png) [@thorseye](https://forum.kirupa.com/u/thorseye)\
**Post date:** [April 4, 2004, 10:25pm UTC](https://forum.kirupa.com/t/php-cant-get-variables-into-flash/106344/1 "2004-04-04T22:25:04Z")

</div>

Ok, I’ve tried and tried for a very long time now. I’ve searched the forums and all threads are saying the same, but I can’t get it to work. So maybe you could help me a little bit.

I’ve got a menu with a submenu, and I want to know which submenu the user last clicked. So I’ve got this script on the submenubuttons:

```auto
on (release) {
 getURL("index.php?plats=1", "_self");
}
on (release) {
 getURL("index.php?plats=2", "_self");
}

```

where the variable “plats” is a number.

I can easily write this number on my php-page. It clearly says: \*&plats=1 \*or _&plats=2_ depending on what button I pressed.

But now to the thing. I can’t get flash to understand that I’m trying to load this variable into flash again to set some \_y-values on a MC.

This is the script I’m using on the MC:

```auto

onClipEvent(load) {
 loadVariables("index.php", 0, "GET");
 if (_root.plats == 1 || _root.plats == null) _root.newpos = 155;
 else if (_root.plats == 2) _root.newpos = 130;
 else if (_root.plats == 3) _root.newpos = 104;
 else if (_root.plats == 4) _root.newpos = 77;
}

```

But as I said, I can’t get flash to understand what value the variable “plats” has. So please. Help me…
