Click here to Skip to main content
15,942,934 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a picture saved at a BLOB field.

I want to show it with PHP, but I'm getting what appears to be the ASCII code.

PHP
$resultado11 = mysql_query("SELECT * FROM Images") or die ("problema-- ".mysql_error());
    $row=mysql_fetch_object($resultado11);
    //Header( "Content-type: image/gif");
    echo $row->Image;


Maybe the problem is not using the header as I have read somewhere. The problem is if uncomment that line I have an error (I get a blank page). Also I dont know how to handle that header, because picture could .jpg or .png... (or does not make a difference) ?
Posted

1 solution

Have you seen this[^]?

The second page deals with retrieving the image.

Hope it helps.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900