# PHP, Flash, MySQL

**URL:** <https://forum.kirupa.com/t/php-flash-mysql/230620>\
**Category:** programming\
**Created:** [June 27, 2007, 6:04pm UTC](https://forum.kirupa.com/t/php-flash-mysql/230620 "2007-06-27T18:04:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Syous](https://avatars.discourse-cdn.com/v4/letter/s/57b2e6/32.png) [@Syous](https://forum.kirupa.com/u/Syous)\
**Post date:** [June 27, 2007, 6:04pm UTC](https://forum.kirupa.com/t/php-flash-mysql/230620/1 "2007-06-27T18:04:41Z")

</div>

Some of you might have read my thread about getting data from a database, and with your help and some research I fixed that problem.

My new problem is taking data I receive from a database and having it to print to a dynamic text field in my swf.

http:/mynewwine.com is the page where I want the text to load (right side of the screen where it says ‘This week at new wine’. The actionscript is correct, of this I’m fairly certain.

[http://mynewwine.com/getData.php](http://mynewwine.com/getData.php) is the file that retrieves the data from my database and echos it to the screen.

In my swf the variable for my text field is myVar. I read the tutorial on here and am stuck, I’ve looked around google as well. Below is my PHP script, I thought about adding print “myVar=$row”; but that doesn’t work. Any suggestions?

```php
<html><head><title>Get Data</title></head>
<body>

<?php

include ("config.php");

$rs = @mysql_select_db( "newwine_admin" )
                         or die ( mysql_error() ) ;
						 
$sql="select id, date, time, details, event from schedule";

$rs = mysql_query( $sql );

while( $row = mysql_fetch_array( $rs ) )
{
   echo("Date: " . $row["date"] ."<br>");
   echo("Time: " . $row["time"] ."<br>");
   echo("Event: " . $row["event"] ."<br>");
   echo("Details: " . $row["details"] ."<br>");
   }
   
?>

</body></html>

```
