Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP integration with Flash

Status
Not open for further replies.

vcherubini

Programmer
May 29, 2000
527
US
Hello:

I am trying to make a PHP/Flash app that allows users to enter stuff via a form and it submits into a database and Flash can read from the database. Inserting information into the database is easy (I am using mySQL btw).

I am having trouble with Flash reading the .php file and echoing the value into Flash.

Here is my code for getting the value out of the database:

[tt]
<?php


$select = &quot;SELECT text1 FROM test&quot;;
$getval = mysql(&quot;test&quot;,&quot;$select&quot;);
$numval = mysql_numrows($getval);
for($rownumber=0;$rownumber<$numval;$rownumber++) {
$text1 = mysql_result($getval,$rownumber,&quot;text1&quot;);
}


echo &quot;$text1&quot;;
?>
/tt]

And in Flash I have a text field with the name text1. On the first frame of the movie, I have the following command:

[tt]
loadVariablesNum (&quot;load.php&quot;, 0, &quot;POST&quot;);
[/tt]

From what I have gathered, this will load the variable(s) from the load.php file. This is not working. When I run the .swf, I get nothing.


Any and all help is appreciated.

Thanks,
-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
if your variables are named text1 the load.php should look like this:

.
.
.
.
.
.
echo &quot;text1=&quot; . $text1;

if this still doesn't work you have to check the command LoadVariablesNum(&quot;load.php&quot;,0,&quot;POST&quot;)
^^^^^^
this is the target this is the target

see you


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top