I have a mysql database with several records. Each record has a longblob field with a different .jpg file in it. Pictures of semi's Not a file name but the actual jpg image.
If I display this image on a new web page by itself it works great.
When I add anything else to the page, such as a record ID, the image will not display but the letters and numbers and special symbols, etc.
How do I display an image from a longblob along with other info on the page?
I have tried adding
header('Content-type: image/jpeg');
before echo'ing the image to no avail.
Will it work if I store the image in a directory on the server and just pull it in when I need it? IE. store the image file name in the database instead of the image? I would prefer to keep the image in the db for housekeeping purposes.