3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by stephen_UK
0

Vague question is vague.

Are you storing the images as BLOB data? Are you storing a relative or absolute path to the location of the image?

Your question cannot be answered without further details.

0

No, i didn't store the image as blob I have a problem while loading and retrieving an image from database.I have loaded an image in the database as of type Image. but when i'm retrieving the image its not shown in webpage.

Coding which i used to retrieve the image:
<?php
mysql_connect("localhost","root","");
mysql_select_db("test");
$image_id = stripslashes($_REQUEST[image_id]);
$rs = mysql_query("select * from image where image_id=\"".
addslashes($image_id).".jpg\"");
$row = mysql_fetch_assoc($rs);
$imagebytes = $row[image_size];
header("Content-type: image/jpeg");
print $imagebytes;
?>

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.