include "expire.phph"; include "database.phph"; $sql = "select type,body from photo where id = $id"; $fetchpic = mysql($db,$sql); if ($fetchpic != 0) { $imagedata = mysql_fetch_object($fetchpic); if (is_object($imagedata)) { $type = $imagedata->type; #header("Content-type: $imagedata->type"); #header("Cache-Control: no-cache, must-revalidate"); #header("Pragma: no-cache"); print $imagedata->body; flush(); } else { echo "
\n"; echo "