# Basic Flash - PHP problem

**URL:** <https://forum.kirupa.com/t/basic-flash-php-problem/242815>\
**Category:** programming\
**Created:** [October 30, 2007, 5:49pm UTC](https://forum.kirupa.com/t/basic-flash-php-problem/242815 "2007-10-30T17:49:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jobu](https://avatars.discourse-cdn.com/v4/letter/j/ea5d25/32.png) [@jobu](https://forum.kirupa.com/u/jobu)\
**Post date:** [October 30, 2007, 5:49pm UTC](https://forum.kirupa.com/t/basic-flash-php-problem/242815/1 "2007-10-30T17:49:56Z")

</div>

I’m really pulling my hair out. I’m running Flash CS3 and PHP 5 and am publishing to FP8 and AS 2.0. I’m trying to run a basic Flash\<-\>PHP example I found online and keep getting PHP code injected into the variables. I’m pretty sure it’s a PHP config problem that I’ve had before (I never remember the correct config when I move from PC to PC):

* * *

AS code, frame 1:  
stop();

//Actionscript  
$var1 = “hello, I’m Bobby.”;  
$var2 = 100;  
$var3 = “John Deer”;

$envelope = new LoadVars();  
$envelope\_received = new LoadVars();

$envelope.variable1 = $var1;  
$envelope.hellothere = $var2;  
$envelope.byebye = $var3;

$envelope\_received.onLoad = function(success:Boolean):Void {  
$the\_status = $envelope\_received.vstatus;  
$final\_result = $envelope\_received.vfinal;  
$tut\_credits = $envelope\_received.vcredits;  
trace('the\_status: ’ + $the\_status);  
trace('final\_result: ’ + $final\_result);  
trace('tut\_credits: ’ + $tut\_credits);  
}

$envelope.sendAndLoad(“script.php”, $envelope\_received);

* * *

PHP code, script.php:  
\<?php  
$phpvar1 = $HTTP\_POST\_VARS[“variable1”];  
$phpvar2 = $HTTP\_POST\_VARS[“hellothere”];  
$phpvar3 = $HTTP\_POST\_VARS[“byebye”];

$mycredits = “Laurent Hogue”;

echo ("&vstatus=complete&vfinal=yes&vcredits=$mycredits&");  
?\>

* * *

I get this in the output (trace) window:

the\_status: complete  
final\_result: yes  
tut\_credits: $mycredits

* * *

It’s not processing the variables on the way out of PHP. I hope this is an easy one… I’ve totally run out of time on this project. Thanks in advance, and my apologies if this has been asked umpteen times by others…
