|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hello,
I have an image saven in mysql database column. I want to extract that from the database and display it on the html page using PERL script. I am able to read from the database but to send it back to html page .. I need to set the mime type. What is the statement that I should write? Generally when we send html stuff then we write the statement as print "content-type:text/html\n\n" what if in the case of image? Please help me in this matter. Thanks in advance. Bindu. |
|
#2
|
|||
|
|||
|
Hi
Why don't you just reference the file name, and write out the image tag on the fly? Or is there a reson the image must be stored within th DB cheers Len |
|
#3
|
|||
|
|||
|
Thanks for the reply. Actually I want to avoid the problem of uploading the images manually. I would like to save them in the database directly and retrieve them from the database while displaying them. This would be very much useful in the case of displaying the banners randomly, and for the dynamic content management. So, I want the solution for the above problem.
Bindu. |
|
#4
|
|||
|
|||
|
I got it...
Well, I got the solution for my problem.
The line that we mention is print "content-type:image/gif\n\n"; Bindu. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Perl Programming > How to display an image from a database |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|