toke
06-19-2007, 08:50 PM
Hi,
I successfully created a magnet board and able to save the data and their position on the database. However, I am struggling with loading these data back to flash. What is the best way to do this? I'm using PHP and MySQL. The unique variable send between the two movies (magnetic board and the reader.swf) is the session varialble. Here is php code for the reader, which i know it's wrong.
<?php
// database info
$dbhost = "localhost";
$dbname = "temp";
$dbuser = "tempe";
$dbpass = "notavailable";
// connect to database
mysql_connect($dbhost, $dbuser, $dbpass) or die ("Cannot connect: ".mysql_error());
mysql_select_db($dbname) or die (mysql_error());
$result = mysql_query("SELECT poemtitle, session FROM magnetic_board");
$cant = 0;
while($row=mysql_fetch_array($result)){
echo "Poemtitle$cant=$row[poemtitle]&Session$cant=$row[session]&";
$cant++;
}
echo "cant=$cant";
?>
<HTML>
<HEAD>
<TITLE>reader</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Preparing the card, please wait --><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="640" height="480" title="poemReader">
<PARAM NAME=movie VALUE="reader.swf?session=<?php echo $session; ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="reader.swf?session=<?php echo $session; ?>" quality=high bgcolor=#FFFFFF WIDTH=640 HEIGHT=480 pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></EMBED>
</OBJECT>
</BODY>
</HTML>
thank you
:confused:
I successfully created a magnet board and able to save the data and their position on the database. However, I am struggling with loading these data back to flash. What is the best way to do this? I'm using PHP and MySQL. The unique variable send between the two movies (magnetic board and the reader.swf) is the session varialble. Here is php code for the reader, which i know it's wrong.
<?php
// database info
$dbhost = "localhost";
$dbname = "temp";
$dbuser = "tempe";
$dbpass = "notavailable";
// connect to database
mysql_connect($dbhost, $dbuser, $dbpass) or die ("Cannot connect: ".mysql_error());
mysql_select_db($dbname) or die (mysql_error());
$result = mysql_query("SELECT poemtitle, session FROM magnetic_board");
$cant = 0;
while($row=mysql_fetch_array($result)){
echo "Poemtitle$cant=$row[poemtitle]&Session$cant=$row[session]&";
$cant++;
}
echo "cant=$cant";
?>
<HTML>
<HEAD>
<TITLE>reader</TITLE>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--Preparing the card, please wait --><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="640" height="480" title="poemReader">
<PARAM NAME=movie VALUE="reader.swf?session=<?php echo $session; ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="reader.swf?session=<?php echo $session; ?>" quality=high bgcolor=#FFFFFF WIDTH=640 HEIGHT=480 pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></EMBED>
</OBJECT>
</BODY>
</HTML>
thank you
:confused: