# Newbie php question

**URL:** <https://forum.kirupa.com/t/newbie-php-question/33459>\
**Category:** Uncategorized\
**Created:** [October 19, 2003, 9:04pm UTC](https://forum.kirupa.com/t/newbie-php-question/33459 "2003-10-19T21:04:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nasier](https://avatars.discourse-cdn.com/v4/letter/n/839c29/32.png) [@Nasier](https://forum.kirupa.com/u/Nasier)\
**Post date:** [October 19, 2003, 9:04pm UTC](https://forum.kirupa.com/t/newbie-php-question/33459/1 "2003-10-19T21:04:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 20, 2003, 3:52pm UTC](https://forum.kirupa.com/t/newbie-php-question/33459/2 "2003-10-20T15:52:34Z")

</div>

when u check the php script does it out put anything?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [October 21, 2003, 7:30am UTC](https://forum.kirupa.com/t/newbie-php-question/33459/3 "2003-10-21T07:30:19Z")

</div>

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 😉
