Flash to php

Problem solved: i had to make the “var” globel. :lol:

anyone who has done flash to php would know this…

flash file:


var temp = 5;
loadVariables ( "myfile.php" , this , "POST" );

now, i’ve a textbox on stage var name = “something”

this is my php:


$howdy = $HTTP_POST_VARS['temp'];
print "&something=hi" . urlencode($howdy) . "&";

after i run the flash file, the “something” textbox has “hi” only; meaning this doesn’t work corrctly. “something” textbox should get “hi5”.

BUT… if i do the following it works corrctly.

i made another textbox var and instance named “hey”


_root.hey = 5;
loadVariables ( "myfile.php" , this , "POST" );

still i’ve a textbox on stage var name = “something”

this is my php, NOTICE THE CHANGE:


$howdy = $HTTP_POST_VARS['hey'];
print "&something=hi" . urlencode($howdy) . "&";

now, after i run the flash file, the “something” textbox has “hi5”.
in conclusion, when i use a textbox as a “var” correct info is passed to the php file, but if i just use “var” in coding, it doesn’t work corrctly. i do NOT want to use a textbox in this process, any solution that would eliminate textbox, so i can just use “var” in code? thanks in advace. :slight_smile: