# Help loading swf from mysql

**URL:** https://forum.kirupa.com/t/help-loading-swf-from-mysql/255832
**Category:** Uncategorized
**Created:** [March 27, 2008, 1:13pm UTC](https://forum.kirupa.com/t/help-loading-swf-from-mysql/255832 "2008-03-27T13:13:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![alexguz79](https://avatars.discourse-cdn.com/v4/letter/a/e274bd/32.png) [@alexguz79](https://forum.kirupa.com/u/alexguz79)
#### Post date: [March 27, 2008, 1:13pm UTC](https://forum.kirupa.com/t/help-loading-swf-from-mysql/255832/1 "2008-03-27T13:13:40Z")

</div>

hey…

im trying to display an swf stored on my database… anyone knows how to do this?

im working on a photogallery and every album is store in the database as a blob field

im using this code and its not working:

this is the object tht calls the flash

\*------------------------------------

\<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“[http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0](http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0)” width=“555” height=“500”\>  
\<param name=“movie” value=“picture\_movie.php?id=\<?php echo $id;?\>”\>  
\<param name=“quality” value=“high”\>  
\<embed src=“picture\_movie.php?id=\<?php echo $id;?\>” quality=“high” pluginspage=“[http://www.adobe.com/shockwave/download/download.cgi?P1\_Prod\_Version=ShockwaveFlash](http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash)” type=“application/x-shockwave-flash” width=“555” height=“500”\>\</embed\>  
\</object\>

* * *

this is the file picture\_movie.php called

* * *

\<?php  
require\_once(‘config\_picture.php’);  
$q = 'SELECT swf\_evento FROM perfect WHERE ID = '.mysql\_real\_escape\_string($\_GET[‘id’]);  
$r = mysql\_query($q) or die(mysql\_error().$q);  
header(“content-type: application/x-shockwave-flash”);  
list($data) = mysql\_fetch\_assoc($r);  
echo $data;  
}  
?\>

* * *

please anyone… im stuck
