# Help with tutorial Intro to PHP, MySQL and Flash

**URL:** <https://forum.kirupa.com/t/help-with-tutorial-intro-to-php-mysql-and-flash/179839>\
**Category:** programming\
**Created:** [February 23, 2006, 11:09am UTC](https://forum.kirupa.com/t/help-with-tutorial-intro-to-php-mysql-and-flash/179839 "2006-02-23T11:09:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rahish](https://avatars.discourse-cdn.com/v4/letter/r/e495f1/32.png) [@rahish](https://forum.kirupa.com/u/rahish)\
**Post date:** [February 23, 2006, 11:09am UTC](https://forum.kirupa.com/t/help-with-tutorial-intro-to-php-mysql-and-flash/179839/1 "2006-02-23T11:09:42Z")

</div>

Hi

Not sure what I am doing wrong,

I did the tutorial and tried to access the swf from localhost

It comes up with the following in the dynamic text field

\_level0.content.content

I have set up the database and table and here is my read.php file

\<?php  
[//read.php](https://read.php)  
//prints contents of content column where filename = $file

include (‘db.php’);

if($file) {  
$link = mysql\_connect($connection)  
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]”;  
?\>

Any ideas
