# AS=\>php and php=\>AS!

**URL:** <https://forum.kirupa.com/t/as-php-and-php-as/117433>\
**Category:** Uncategorized\
**Created:** [July 27, 2004, 1:37pm UTC](https://forum.kirupa.com/t/as-php-and-php-as/117433 "2004-07-27T13:37:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bmerens](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bmerens](https://forum.kirupa.com/u/bmerens)\
**Post date:** [July 27, 2004, 1:37pm UTC](https://forum.kirupa.com/t/as-php-and-php-as/117433/1 "2004-07-27T13:37:01Z")

</div>

* * *

hi there,

question : I have a main.swf who loads a 2nd.swf on level 501 ( for exemple)

the 2nd.swf wants u to typ your email adresse and sends it to a verify.php to compare the email to the one in the database.

until here, it works !

but

the php sends : access=“ok” to 2nd.swf

but the variable send by php never arrives.

so, I tried the 2nd.swf alone without being load by another swf first. and it works. php sends access=“ok” to 2nd.swf.

why doesn’t it work when it first gets loaded on a different level than 0 ???

---

<div class="post-metadata">

**Author:** ![kode](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kode](https://forum.kirupa.com/u/kode)\
**Post date:** [July 27, 2004, 3:36pm UTC](https://forum.kirupa.com/t/as-php-and-php-as/117433/2 "2004-07-27T15:36:07Z")

</div>

Surely a scope/targetting issue. Could you post your code? 😉

---

<div class="post-metadata">

**Author:** ![bmerens](https://avatars.discourse-cdn.com/v4/letter/b/43a26b/32.png) [@bmerens](https://forum.kirupa.com/u/bmerens)\
**Post date:** [July 27, 2004, 3:59pm UTC](https://forum.kirupa.com/t/as-php-and-php-as/117433/3 "2004-07-27T15:59:54Z")

</div>

here the script in a zip file

---

<div class="post-metadata">

**Author:** ![kode](https://avatars.discourse-cdn.com/v4/letter/k/97f17d/32.png) [@kode](https://forum.kirupa.com/u/kode)\
**Post date:** [July 29, 2004, 12:33am UTC](https://forum.kirupa.com/t/as-php-and-php-as/117433/4 "2004-07-29T00:33:34Z")

</div>

Here’s where the problem is:  
[font=courier new]loadVariablesNum(“connexionphp.php”, 0, “POST”);[/font]

Why? It’s quite simple, actually. You’re loading the variables into level 0, no matter if you call the [font=courier new]loadVariablesNum()[/font] function from level 501. You could either 1) use the [font=courier new]MovieClip.loadVariables()[/font] method, or 2) specify the correct level into which the variables should be loaded.

1. [font=courier new]this.loadVariables(“connexionphp.php”, “POST”);[/font]
2. [font=courier new]loadVariablesNum(“connexionphp.php”, 501, “POST”);[/font]

😉
