Hi people
I’m trying to fetch data from my mysql db to my flash site (news items).
I’ve made a .php file, but I don’t know how to put this into a flash dynamic text box :*(
I’ve been doing tuts for many days but I just can’t get it to work.
I’ll append my get.php file. Any help appreciated!
<?php
$server = “localhost”;
$user = “username”;
$pass = “password”;
$database = “pgrimcen_news”;
$tableName = “newsnews”;
$conn = @mysql_connect($server,$user,$pass);
$database = @mysql_select_db($database,$conn);
$query = @mysql_query(“SELECT id, subject, titletext, maintext FROM $tableName”);
$total_rows = @mysql_num_rows($query);
$counter = 0;
while($ourData = @mysql_fetch_array($query)){
$id = $ourData[“id”];
$subject = $ourData[“subject”];
$titletext = $ourData[“titletext”];
$maintext = $ourData[“maintext”];
$counter++;
print($id.$subject.$titletext.$maintext);
}
print("&total=$total_rows");
?>