Click here to Skip to main content
13,000,127 members (51,327 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I saved image as blob along with width and height. I have image id, but when I retrieve the image from mysql, image is not getting displayed on my PHP page.

I am saving the image from one page and retriving in another page by passing image id.
I am using this code for src

echo "\n<IMG SRC=\"image.php?image_id=$image_id\" />";

and in image.php I have the code to retrive the values.
Posted 26-Jul-12 1:41am
Updated 26-Jul-12 2:52am
Sandeep Mewara 26-Jul-12 8:02am
Surely some issue in your code, difficult to comment for anyone until you share.
Malli_S 26-Jul-12 8:54am
Edit - Sentence re-framing and code formatting.
AlluvialDeposit 26-Jul-12 10:40am
try open the image in a browser, you'll get some more information about the error.. http://localhost/image.php?image_id=123
Mohibur Rashid 27-Jul-12 1:07am
Humm, you better try to write the information into a file and then try to open the file with image viewer. if you can see then I would ask you the code for image.php.

also fllow the suggestion by alluvialdeposit

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Don't use the img src for display the retrive image from mysql

print $image

$image is a image retrive from a mysql.

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170624.1 | Last Updated 27 Jul 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100