ad_img_show($table, $id); /* print_r($res);exit; echo "here"; */ header("Content-type: ". $res[0]['ad_type']); print $res[0]['ad_img']; ?>