Rithish wrote:
Quote:
I am unsure if javascript has got to do anything with my problem.. In
fact I am even unsure of a solution to my problem.
What I want to achieve is to pick the image data from the database
rather as a static file on the server. I have a PHP file which
supplies me with the image data from the database.
Effectively, I would want something like
IMG src='http://myserver.com/GetImage.php?strImageId=img_id_1'/
GetImage.php is a file which would serve me with the image data from
the database; depending on the 'strImageId' variable.
The above snippet outputs a pile of binary data.... Are there headers
to be inserted?? |
Well, it is a PHP question, make sure your GetImage.php tells the client
that it sends an image, e.g. for a GIF image
header('Content-Type: image/gif');
--
Martin Honnen
http://JavaScript.FAQTs.com/