# Using flash mysql php tutorial trouble

**URL:** <https://forum.kirupa.com/t/using-flash-mysql-php-tutorial-trouble/75059>\
**Category:** Uncategorized\
**Created:** [January 5, 2005, 5:23pm UTC](https://forum.kirupa.com/t/using-flash-mysql-php-tutorial-trouble/75059 "2005-01-05T17:23:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CollyK](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@CollyK](https://forum.kirupa.com/u/CollyK)\
**Post date:** [January 5, 2005, 5:23pm UTC](https://forum.kirupa.com/t/using-flash-mysql-php-tutorial-trouble/75059/1 "2005-01-05T17:23:01Z")

</div>

[font=Arial][size=2]I thought I might avail of your offer for some help on your tutorial “Use Flash with PHP and mySQL”[size=1] [/size][/size][/font][font=Arial][size=2][size=1][[size=2]http://www.kirupa.com/developer/actionscript/flash\_php\_mysql.htm[/size]](http://../developer/actionscript/flash_php_mysql.htm)[/size][/size][/font]

[font=Arial][size=2][size=1][size=2]I am not returning any text from my database into my textfield (with the variable name ‘content’) and wonder if you can locate anything obvious in the process I have done.[/size][/size][/size][/font]

[font=Arial][size=2][size=1][size=2]I am using phpmyadmin remotely[/size][/size][/size][/font]

[font=Arial][size=2][size=1][size=2][color=#800000]my mySQL database table is called ‘files’ and my database is called ‘myweb318235\_colum’  
I have two files in the table[/color][/size][/size][/size][/font]

[font=Arial][size=2][size=1][size=1][color=#800000] **Host:** [lalalalala.com](http://lalalalala.com)  
**Database :** bababababa\_baba  
**Generation Time:** Jan 03, 2005 at 10:28 PM  
**Generated by:** phpMyAdmin 2.5.4  
**SQL-query:** SELECT \* FROM `files` LIMIT 0, 30; [/color][/size][/size][/size][/font]

```
  [color=#800000]filename [/color] [color=#800000]content [/color] [color=#800000]testfile[/color] [color=#800000][BLOB - 36 Bytes][/color] [color=#800000]testfile2[/color] [color=#800000][BLOB - 61 Bytes][/color]

```

[font=Arial][size=2][size=1][size=1] [/size][/size][/size][/font]

[font=Arial][size=2][size=1][size=1] [/size][/size][/size][/font]  
[font=Arial][size=2][color=#000080]my flash files are called bigphpmysqltest.fla and bigphpmysqltest.swf [/color][/size][/font]  
[font=Arial][size=2][color=#000080]in bigphpmysqltest.swf I have the dynamic text field with variable = content which is saved amovieclip with this actionscript[/color][/size][/font]

[font=Arial][size=2][color=#000080]onClipEvent (load) {  
loadVariables(“read.php?file=testfile”, this, “GET”);  
}  
[/color][/size][/font]

[font=Arial][size=2][color=#008080]the php file is called ‘read.php’[/color][/size][/font]

[font=Arial][size=2][color=#008080]\<?php[/color][/size][/font]

[font=Arial][size=2][color=#008080]if($file) {  
$link = mysql\_connect(“hostname”,“username”,“password”,“databasename”) or die (“didn’t connect to mysql”);

$query = “SELECT content FROM files WHERE filename=’$file’”;  
$result = mysql\_query($query)  
or die("\<b\>error\</b\>: failed to execute query \<i\>$query\</i\>");[/color][/size][/font]

[font=Arial][size=2][color=#008080] mysql\_close($link);[/color][/size][/font]

[font=Arial][size=2][color=#008080] $desiredContent = mysql\_fetch\_array($result, MYSQL\_ASSOC);[/color][/size][/font]

[font=Arial][size=2][color=#008080] mysql\_free\_result($result);[/color][/size][/font]

[font=Arial][size=2][color=#008080] print “content=$desiredContent[content]”;  
?\>[/color][/size][/font]

[font=Arial][size=2][color=#008080][/color][/size][/font]  
[font=Arial][size=2][color=#008080][size=+0]files [/size][size=+0]is the table in the database[/size][/color][/size][/font]

[font=Arial][size=2]It just doesn’t work unfortunately - I have been intouch to my server people to check if my register\_globals was on but they couldn’t help.[/size][/font]  
[font=Arial][size=2]Unfortunately I am a very novice beginner in this and if nothing is obvious in the above, how would I use $HTTP\_POST\_VARS into the php file? [/size][/font]

[font=Arial][size=2]I would so appreciate your help![/size][/font]

[font=Arial][size=2]Thanks in advance.[/size][/font]

[font=Arial][size=2]CollyK[/size][/font]
