Hey guys, I've been trying to display some images stored in a mysql database. The upload script seems to work fine. My problem arises when i try to display the images. I use two files, one called view.php and the other view_image.php. The view.php file includes the following code. $query = "SELECT mime_type,image FROM testblob2 WHERE id = 1"; //the image field is of type longblob and the mime_type field is of type varchar $result = @ mysql_query ($query,$connection); $data = @ mysql_fetch_array($result); if (!empty($data["image"])) { // Output the MIME header // header("Content-Type: {$data["mime_type"]}"); // Output the image echo $data["image"]; } When i pulled this script (view.php) through the browser i received the same output that you get when you open up an image file with a text editor. A bunch of weird symbols. I then included the following code in the view_image.php file: $query = "SELECT id,image_name FROM testblob2"; $result = @mysql_query($query,$connection); if($row = @mysql_fetch_array($result)) { echo "{$row["image_name"]}"; echo "<img src=\"view.php?file={$row["id"]}\">"; } When i pull up view_image.php through the web browser i get a broken link where the image is supposed to be. I can't seem to resolve this issue. I also would like to fully understand the line echo "<img src=\"view.php?file={$row["id"]}\">"; Where does the word "file" come from since i can't find a line where it gets passed to the script and what is the function of the "?" I guess its similar to the url above [a href=\"http://www.phpfreaks.com/forums/index.php?act=post&do=new_post&f=1\" target=\"_blank\"]http://www.phpfreaks.com/forums/index.php?...do=new_post&f=1[/a] why is the word or value "act=post&do=new_post&f=1" used and where does it come from. Does it have to be passed to the script using GET or POST . I'm just trying to pinpoint where i've gone wrong. I'm a relative newbie to php coding but i don't believe that retrieving and displaying an image from a database should be so frustrating. Must be something simple that i'm missing. Another forum that i checked mentioned that a broken link for the image usually means that the header has not be sent. Should I be sending the filesize with the header as well . I'm not debating whether or not I should have stored the absolute paths instead of storing the images in the databse as blobs. I'd just like to deal with the issue at hand. Displaying the images that are currently stored.