Pages

Your Ad Here

This Blog is not to read or go through

because, I have never been such a mess


Search the blog instead

Saturday, November 17, 2007

PHP, BLOB and picture

website: http://www.webmasterworld.com/forum88/1325.htm


$sql = "SELECT Pic FROM Pictures WHERE ID=$id";
if(!($result=@mysql_query($sql))) showerror;

$data=@mysql_fetch_array($result);

if (!empty($data['Pic']))
{
//Change content type to your file type
header("Content-Type: image/gif");
print $data['Pic'] ;
}

No comments:

Your Ad Here