Displaying image from MySql DB

From: Date: Sat, 23 Feb 2002 00:06:07 +0000
Subject: Displaying image from MySql DB
Groups: php.general 
Request: Send a blank email to php-general+get-85910@lists.php.net to get a copy of this message
Hi Guys, I have some images stored in my MySql database that I'd like to display on the bottom of my HTML page. However, whenever I attempt to display the images using the follow code: $getPhoto = mysql_fetch_object($result); $Type = $getPhoto->type; Header("Content-type: $Type"); $Body = $getPhoto->body; echo $Body; flush(); I get an error that states: "Cannot add header information - headers already sent by...". Now I understand why I'm getting the error. What I'd like to know is how to get around it? Basically what I want is the image in the DB to be displayed like any regular image would be on an HTML page, i.e. <img src="imageGoesHere" height="x" width="x" border="x">. However, I still need to pass the HTML headers. O From Now 'Till Then, \-> Reginald Alex Mullin /\ 212-894-1690 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the postmaster at postmaster@sothebys.com. www.sothebys.com **********************************************************************

« previous php.general (#85910) next »