Show image or flash file



after upload a file, if it is a image, it can show , but if it is a flasf file, it won't show up, what is the problem, the code is here:

if ($qry['Type']=="application/x-shockwave-flash")
echo "<object classid=clsid:166B1BCA-3F9C-11CF-8075-444553540000 codebase=,5,0,0 width=640 height=400>";
echo "<param name=src value='$filename>'";
echo "<embed src='$filename' pluginspage= width=640 height=400></embed>";
echo "</object>";
elseif ($qry['Type']=="image/pjpeg")
$size = getImageSize($filename);
$width = $size[0];
$height = $size[1];

echo "<TR>";
echo "<div align=left><IMG SRC='$filename'";
echo "WIDTH='$width' HEIGHT='$height'>";
echo "</div></TD>";
echo "</TR>";
Debugging isn't that hard. First you have to figure out what the problem is. Then you have to fix it.

So, firstly, are you getting any errors? Barring that, we'll move on..

Secondly, is any of the HTML showing up for the Flash part of the code? If not, then we know the problem: Your condition is failing when it shouldn't.

If the HTML is showing (when you View Source, that is) but the movie isn't, then examine the HTML and make sure that it looks like you expect.