Having Trouble with Storing Image Path in mySQL field

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jewellman
    New Member
    • Feb 2010
    • 1

    Having Trouble with Storing Image Path in mySQL field

    Hello. I have been reading over some posts that deal with my issue and although I couldn't get my issue to work I did read some very good information.

    I have created a mySQL table that I will use to populate vehicle inventory with. My fields are- Primary_Key, Year, Make/Model, Description, Mileage, Price, and Image. The problem I am having is with the Image field. I can't get the image to display from the browser. I read on here somewhere that the way to make it work is to insert a string in the field similar to this-

    <img src='http://www.mysite.com/pics/pic1.jpg; ?>' alt='the image' />

    However this doesn't work. Should I also be using a php script to make this work?

    Ideally, I would love to have the image display as a thumbnail, for example at 100x70 pics, then when the image is clicked on the full image is displayed (in a new browser windows if possible).

    Any help would be greatly appreciated.

    Thanks!
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Moved to PHP forum.

    Comment

    • dlite922
      Recognized Expert Top Contributor
      • Dec 2007
      • 1586

      #3
      I'm wondering how you thought you could get stuff (an image path) from a database table to the HTML page WITHOUT php.

      I'm even confused about whether you want to store the actual image in the DB or just the name.

      As for the thumbnail, you would have to use an image library like GD for PHP to alter the image and create a smaller version. If not you would just have to re-size the image with HTML/CSS.




      Dan

      Comment

      Working...