|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
How to display image?
I have a blob field that I want to fill with a JPG file. Along with the image are some descriptive fields. Using php, I can display the contents from the descriptive fields in the browser, but I cannot get the images to display. Does anyone know a way to do this?
Thanks....douglas |
|
#2
|
|||
|
|||
|
you have to send a header saying that it's an image.
|
|
#3
|
|||
|
|||
|
There's an article that will teach u everything about that right here on devarticles.com URL
I used it on one of my projects and it worked perfectly! |
|
#4
|
|||
|
|||
|
Thanks for the info and the link to the article. I'll give that a try. The article presents a way of displaying some text first and then having a user click on a link to display the image. I see now where the Header function is used to tell the browser what type of data to expect. However, do you know if it is possible to display both the text (from fields in the table) and then the image within the same page?
....douglas |
|
#5
|
|||
|
|||
|
It's possible, but you must output the text and then then image. You use the src attribute to point to the page that spits out the image, like this:
<h1>This is my text</h1> <img src="getimage.php?imageId=10"> So basically you call the script that outputs the headers as the "Src" attribute of the image. ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > How to display image? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|