Jump to content

Images in MySQL


atchy

Recommended Posts

Hi All,
I am using, document.getElement by id, to load large version of a thumbnail image on click. The data in the MySQL table as follows: <img src=images_large/r_price_lg1b.jpg> This has served me well when using ASP now into PHP and the only way I can get this to work is to put the full url of the image into the database ie
img src=http://www.mysite.com/images_large/name_lg1b.jpg for every image. Is there an easier way? The thumbnails use <img src=images_small/r_price_sm1b.jpg title='Richard Price - Heaven and Earth'> and work ok so its something to do with the document.getElement by id. Any clues!

Thanks

Atchy
Link to comment
Share on other sites

Unfortunately, I do not have any answer for this, but I do have a similar question.  I created a form to upload documents and images to a Mysql table.  The files appear to upload properly, but when I attempt to display them in a web page, only the file name is displayed ie. "image.jpg", but not the actual document or image.  I have used the img src tag plus the variable that returns the document name.  I would appreciate guidance as to how to have images called from a Mysql db displayed on a web page.  Since I am new to this forum, I am  not sure if this is the way to submit this question, or if starting another topic would have been more appropriate.  Guidance with that would also be appreciated. Thanks.
Link to comment
Share on other sites

Atchy,

Thank you for your quick response.  I am using this with a web-enabled database where users are recording anecdotes in a text field and then have the opportunity to upload a document or graphic as an artifact.  I don't really want to provide FTP access to all of the users.  Your suggestion leads me think that I should use PHP to move the file to the my web folders rather than the database.  I am not sure how to do that, but I believe that it is possible.  I do know how to use the database to link to other resources, as I have done that in the past.  If you, or anyone else, has other suggestions, I would appreciate hearing them.  Thanks.

John
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.