Displaying an image saved as a Blob in a MySql DB?

Php require_once ('. /includes/db.inc. Php'); // Connect to the db.

//let the browser know its an image header("Content-type: image/jpeg"); // Make the query. $query = "SELECT thumbnail FROM items where item_id=" . $_GET'item_id'; $result = @mysql_query ($query); if ($row = mysql_fetch_array($result, MYSQL_ASSOC)){ echo $row'thumbnail'; } mysql_close(); // Close the database connection.?

Here is a fairly simple example of displaying an image stored as a blob.

Skip the Content-length and Content-disposition, just use Content-type and set it to a valid MIME type. Assuming they're JPEGs, you'd do this: header( 'Content-type: image/jpeg' ); Check out this link too.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions