PDA

View Full Version : newbie php question



Nasier
October 19th, 2003, 05:04 PM
in frame 1 I've a dynamictextfield named "example".

Also in frame 1 there's this actionscript:
loadVariables ("myPHP.php", this, "POST");
stop();

There are no more frames in this .fla.

In myPHP.php there's the following script:

<?
$example = '12';

print "&result=Okay&example=$example&";

?>

When I publish this the dynamictextfield doesnt
say 12. What am I doing wrong?

Thanx in advanced.

Digitalosophy
October 20th, 2003, 11:52 AM
when u check the php script does it out put anything?

eyezberg
October 21st, 2003, 03:30 AM
the variable of the textfield needs to be example, not it's name.
as you're using the result var to check it's ok, change the order of the echo to
print "&example=$example&result=Okay";
and in flash, use an empty controler clip with an attached onEnterFrame to check if(result=="Okay"){ textfield.text=example;}
Better to use LoadVars, coz you get the "onLoad" for free ;)