# PHP/Flash interaction

**URL:** <https://forum.kirupa.com/t/php-flash-interaction/296036>\
**Category:** flash\
**Created:** [September 8, 2009, 10:14pm UTC](https://forum.kirupa.com/t/php-flash-interaction/296036 "2009-09-08T22:14:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![truefire](https://avatars.discourse-cdn.com/v4/letter/t/f17d59/32.png) [@truefire](https://forum.kirupa.com/u/truefire)\
**Post date:** [September 8, 2009, 10:14pm UTC](https://forum.kirupa.com/t/php-flash-interaction/296036/1 "2009-09-08T22:14:33Z")

</div>

well, I rad a tutorial here somewhere that explained how to interchange data between a .swf and .php file. Followed its instructions, replacing the localhost file it said to use with the url of the .php since I dont have a private server set up. It’s not working, and I can’t find anythign wrong with it, so I’m hoping osmeoine who knows what they’re doign could point it out.

In the .php:

\<pre\>  
[SIZE=2]\<?php  
$x = “abc”;  
echo ’  
\<object width=“550” height=“400”\>  
\<param name=“movie” value=“FlashSide.swf”\>  
\<embed src=“FlashSide.swf” width=“550” height = “400”\>  
\</embed\>  
\</object\>  
';  
print “myVar=$x”;  
?\>  
[/SIZE]  
\</pre\>

inthe .swf I have a movie clip with this code on it:

\<pre\>  
onClipEvent (load) {  
loadVariables(“[http://dhost.info/lfpgame/PHPSide.php](http://dhost.info/lfpgame/PHPSide.php)”, this, “GET”);  
}  
\</pre\>

in that MC i have a dynamic text with variable myVar.

Ive uploaded them both, and the result comes out as the .swf with nothing in the textbox, then “myVar=abc” printed to the screen. Anyone know whats wrong?
