not sure if im posting this in the right area but...
This is prob really easy but im trying to store a image in mysql in a blob. Not sure how to put the image in there to start with, not sure weather to upload to webserver and put in the address to picture etc..
And then i want to display the image using php on a webpage including other information from the database. I can get it to show all the other information in the database but not the images.
$filename = '../images/ftr890x50.png';
$fp = fopen($filename,'r');
$contents = fread($fp, filesize($filename));
$query = 'insert into images.imagestore (image_name,image_type,image_bytes) values '
<!-- Just read it back in into a an image element -->
$query = 'select image_bytes from images.imagestore where image_name = "ftr890x50.png"';
$result = mysql_query($query);
$image_bytes = mysql_result($result,0,'image_bytes');
// This is the key to displaying the image...
header('Content-length: ' . strlen($image_bytes));