# Loading PHP variables on Flash... something wrong?

**URL:** <https://forum.kirupa.com/t/loading-php-variables-on-flash-something-wrong/189033>\
**Category:** flash\
**Created:** [May 12, 2006, 6:11pm UTC](https://forum.kirupa.com/t/loading-php-variables-on-flash-something-wrong/189033 "2006-05-12T18:11:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Red\_Blaze](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@Red\_Blaze](https://forum.kirupa.com/u/Red_Blaze)\
**Post date:** [May 12, 2006, 6:11pm UTC](https://forum.kirupa.com/t/loading-php-variables-on-flash-something-wrong/189033/1 "2006-05-12T18:11:31Z")

</div>

I have 1 Flash File, and 2 folders, with 1 XML file in each. This is how the directory looks like:

Root Folder  
|\_images folder  
| |\_FE folder (artist 1)  
| | |\_images folder \<–The images.  
| | |\_images.xml  
| |  
| |\_AE folder (artist 2)  
| |\_images folder \<–The images.  
| |\_images.xml  
|  
|\_art.swf  
|\_index.php

The way I want it to work is like this: A user will click on a link with the url looking like this: index.php?initial=FE (or AE).

I want flash to get that initial value, and tell it what directory it should choose to get the correct XML file. This is what I have in the Action Script:

```auto
startDrag("/Zoom", true);
    _root.Zoom._visible = false;
    
/* first create a new instance of the LoadVars object */
myVars = new LoadVars();
// call the load method to load my php page
myVars.load("index.php");
// once vars have been loaded, we will have these variables:
initials = myVars.ini

//THIS IS WHERE IT SHOULD CHOOSE WHICH DIRECTORY TO CHOOSE FROM TO GET THE CORRECT XML FILE!!
xmlData.load("images/"+initials+"/images.xml");
/////////////////////////////////////

```

The following is my PHP code:

```auto
echo $_GET['initial'] . "<br>";
$initial = $_GET['initial'];
$vars = "";
$vars .= "ini=" . $initial;
echo $vars . "<br>";

```

I don’t know what I’m doing wrong, because it won’t display anything, as you can see [here](http://www.chaossanctum.com/work/flash/index.php?initial=FE).
