hey guys. i’m a n00b here. i tried searching for this but couldn’t find a good solution. well here is my dilema:
i followed the **[FONT=Verdana][SIZE=4][COLOR=#003366]Learn [/COLOR][/SIZE][/FONT] **[FONT=Verdana][SIZE=4][COLOR=#003366]How to Use Flash with PHP and mySQL
[COLOR=Black][SIZE=2] in the tutorials section. i followed it exactly (redoing the whole tutorial 3 times already) but the error thing is i’m not getting any values from my SQL Server posted on to my flash site. i loaded it thru my Apache Server and all i get is this: transfering data to localhost on the statusbar of FireFox and the loading circle on the top right doesn’t rotate.
so i tried in Internet Explorer. and the status bar there just said Done.
i checked if my PHP was installed correctly by putting the command phpinfo() into a php file and it showed the page with the info on php. so i tried it w/ SQL and i can add stuff to MySQL thru PHP. So i know that there is no problem with my installation of the system. (i used WAMP to install Apache, PHP and MySQL)
and this is the code that i had:
[/SIZE][/COLOR][/COLOR][/SIZE][/FONT]
<?php
//read.php
//prints contents of content column where filename = $file
if($file) {
$link = mysql_connect("localhost", "regular", "user")
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]";
?>
on the Flash Page, I made a dynamic text box with variable (not instance) name content. then i made that into a movie clip and put this for the actionscript for the movie clip.
onClipEvent (load) {
loadVariables(“http://localhost/read.php?file=testfile”, this, “GET”);
}
I also attached my files.
Can someone please help me out. i don’t know whats up. i’m breakin my head over this. thanx in advance!