>I'm using this script to insert picture into database:
>  $data = addslashes( fread( fopen( $arrayUploadedSomething['tmp_name'],
>"r"), filesize($arrayUploadedSomething['tmp_name'] ) ) );
>
>And then i use ordinary mysql_query to insert it into database (BLOB field).
>When i print image on screen, I use this code:
>
> header("Content-type: " . $arraySomething['something_type']);
> header("Content-Disposition: inline; filename=" .
>$arraySomething['something_name'] );
> print $arraySomething['something_data'];
>
>And it works very well...:D
>
>BUT, if i insert Flash animation (or something else made in Flash) it goes
>into database well, but when I print it out .... :D
>It wants to download (ignoring the contex-dispositon header) , and if i
>click open or save, it show error ....

Did you also store the type and file name in the database, or are you trying
to use the variables $arraySomething which are no longer valid?

>I know that I must use HTML like this:
>----------------------------------------------------------------------
><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
>codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
>b#version=6,0,29,0" align="middle">
>     <param name="movie" value="something/show.php?bid=<?php echo
>$arraySomething['bid'];?>" />
>     <param name="quality" value="high" />
>     <embed src="something/show.php?bid=<?php echo
>$arraySomething['bid'];?>" quality="high"
>pluginspage="http://www.macromedia.com/go/getflashplayer"; align="middle"
>type="application/x-shockwave-flash"></embed>
>  </object>
>----------------------------------------------------------------------

But here you have:

arraySomething['bid'] which does not provide either
arraySomething['something_name'] nor _type nor _data...

Oh.

No.

You can't do that.

Your URL is looking like this:

something/show.php?bid=Array

Look at "View Source" in your browser.

You'll need to provide each variable separately:

...value="something/show.php?<?php
  while (list($key, $value) = each($arraySomething['bid'])){
    echo "&$key=", urlencode($value);
  }
?>" quality=high


>It prints out Flash but the size is not correct, and it si blank (white)...
>Anyone knows where the problem could be ?

-- 
Like Music?  http://l-i-e.com/artists.htm


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to