[php] send simple data from php to flash

this is probably the simplest question about working with php and flash but i’m sick of search and i can’t find the answer or a tutorial that do exactly what i want :frowning:

i have this php script to get data from my mysql database and i want this data to appear on a flash textfield. i want ALL the data. not only the data from the first row.

the script i’m using is:

$qr = mysql_query(“SELECT * FROM flash_news”);
$nrows = mysql_num_rows($qr);
for ($i=0; $i < $nrows; $i++) {
$row = mysql_fetch_array($qr);
echo $row[‘author’].", “.$row[‘title’].”<br>";
echo " “.$row[‘body’].” “.$row[‘timestamp’].”<br><br>";

now anyone can please(!!) tell me how to put this in a flash txt field?
Thanks alot and sorry for ask something to basic but i can’t find any tutorial with this. all tutorials that i find is for more complex things and i just need this for now :]

Thanks for your help.

I’ll probably only need to add code to the text field but if’s it’s more than this please explain step by step :sigh:

  $qr = mysql_query("SELECT * FROM flash_news");
  while($row = mysql_fetch_assoc($qr)) {
   echo $row['author'].", ".$row['title']."<br>";
  echo " ".$row['body']." ".$row['timestamp']."<br><br>";


this is your help? :frowning:

er… but and what i have to do in flash for this script work?

I dunno if this helps or works, its bits of something I am working on and I dont know crap about PHP/mySQL.

   $DBhost = "*****";   
   $DBuser = "*****";			
   $DBpass = "*****";		   
   $DBName = "*****";			
   $table = "*****";			 
   $DBConn = mysql_connect($DBhost,$DBuser,$DBpass) or die("Error" . mysql_error());
	  mysql_select_db($DBName, $DBConn) or die("Error" . mysql_error());

   $action = $_GET['action'];
   switch($action) {
	  case 'read' :
	  $sql = 'SELECT * FROM `' . $table . '`';  
	  $allComments = mysql_query($sql, $DBConn) or die("Error" . mysql_error());
	  $numallComments = mysql_num_rows($allComments);

   print "<br>&info="; 
	 if($numallComments == 0) {
	  print "	   No data.."; } 
   else { while ($array = mysql_fetch_array($fewComments)) {
		 $data = mysql_result($fewComments, $i, 'data');
	Data: </b><br>' . $data . '</i><br>

In flash

function loadEntries(act, increment) {
myEntries = new LoadVars()  myEntries.ref = this
 myEntries.onLoad = function(success){ 
mytextbox.text = this.info;