Hi
I am trying to send data from mySQL database to flash mx 2004.
well I have a banner and a database with single table called banner and in a table I have ‘id’ and ‘content’ fields.
I downloaded phpObject installed all that … but I can’t work out how to actually in flash on a press of a button query the database and grab info from that content field and display it ???
I am still not having luck with this can someone explain it to me ? here are the bits ( lets get just the data to display from the DB in flash then I’ll worry about getting buttons to trigger this)
ok so I have a php file called grab.php
<?
$db_name = “rsa”;
$connection = @mysql_connect(“203.89.237.71”, “user”, “pass”) or die(“Cound not connect to database”);
mysql_select_db($db_name, $connection) or die(“Count not select database”);
$query = “SELECT content FROM banner”;
$q_result = mysql_query($query);
return mysql_fetch_row($q_result);
echo “&var1=$q_result”;
?>
I have a flash banner in which I load the phpObject
#include “PHPObject.as”
tmp = new PHPObject();
tmp.setDefaultGatewayKey(“secret”);
tmp.setDefaultGatewayUrl(“http://test.com/phpObject/Gateway.php”);
delete tmp;
myFoo = new PHPObject(“grab”);
Then what do I do ??? how do I reference the grab.php file ???
and how do I display it in the textfiled instance “myTextField” ???
Please help, thanks
p.s. I know the phpObject works I tested it with a default text.swf it was ok and I have the correct user login for the db etc…