0) { list ($type,$img)=mysql_fetch_row($r); if (strlen($img)==0) { header("Content-Type: image/gif"); readfile("./images/spacer.gif"); } else { header("Content-Type: ".$type); echo $img; } } else { header("Content-Type: image/gif"); readfile("./images/spacer.gif"); } ?>