Hey guys.
I have searched this code alot before, and I cannot find any errors in the actual code, its just not doing what I want it to do. I want this code to embed a flash object dynamically onto the webpage. The information is being extracted correctly from the database because the filename, height, width etc. works. It is just not loading the flash object.
<?php
// Require the database class
require_once('../includes/DbConnector.php');
// IMPORTANT!!! Validate the ID number. See below
// Create an object (instance) of the DbConnector
$connector = new DbConnector();
//Execute mySQL query to get results
$result = $connector->query('SELECT title, filename, height, width, instructions FROM cmsgames WHERE ID = 2');
$row = $connector->fetchArray($result);
?>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"
WIDTH="<?php echo $row['width'];?>" HEIGHT="<?php echo $row['height'];?>" id="<?php echo $row['title'];?>" >
<PARAM NAME=movie VALUE="<?php echo $row['filename'];?>" >
<PARAM NAME=quality VALUE=high>
<EMBED src="<?php echo '../games/' . $row['filename'];?>" quality=high WIDTH="<?php echo $row['width'];?>" HEIGHT="<?php echo $row['height'];?>"
NAME="<?php echo $row['title'];?>" ALIGN="" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">
</EMBED>
</OBJECT>
Thanks 🙂