Flash php MySQL [Troubles]

Hi.
I’m tryin to follow all steps of tutorial of this matter, but this is not working.
I have uploaded a zip whit all files I’m working, so please check it and let me know what I’m doing wrong.

Files

Regards !

JOHNMARTIN

your php code is wrong. this is how it should be:


if($_GET['file']) {
  $file = $_GET['file'];
  $link = mysql_connect(dbhost, dbuser, dbpassword) or die("<b>error</b>: failed to connect to database");
  $query = "SELECT content FROM files WHERE filename='$file'";
  $result = mysql_query($query) or die("<b>error</b>: failed to execute query <i>$query</i>");
  mysql_close($link);
  $desiredContent = mysql_fetch_array($result, MYSQL_ASSOC);
  mysql_free_result($result);
  print "&content=$desiredContent[content]";
?>

(you have to use the $_GET[] when referring to variables sent in the url string.)

As you said I changed, but … this is not working.

Someone have the files complete and working to know where I’m mistake?

Regards !