SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Image display from DB file path with thumbnail.....need help pls

    Hello,

    I have images file path in my table and images are store in a location of my server. I have total 3 image column image1, image2 and image3 in my table which containing image file path. I want to retrieve these images from my db and show on page in a way that the 1st image will displayed as full size and 2nd and 3rd image will displayed as thumbnail just under the 1st image and if anyone click on the thumbnail will see full size image. Its very similar like ecommerce website product's image display.

    I am really not sure how can i do it. anyone can help me please?

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    echo '<img src="' $db_row['image1'] .'">';
    echo 
    '<img src="' $db_row['image2'] .'">';
    echo 
    '<img src="' $db_row['image3'] .'">'
    Thumbnails and other features are left as a excersise for you. Swapping images however from thumbnail to full will require the use of javascript. But if you have some existing code already and have done some work then maybe we can be more help. Or you can hire some one...
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2008
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi logic_earth,

    thnx for ur reply but i think ur code will only display the images. but i want the 1st image will displayed as full size and 2nd and 3rd image will displayed as thumbnail just under the 1st image and if anyone click on the thumbnail will see full size image.

    can u pls tell me how can i do that or any idea? thanks.

  4. #4
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    What you want is not PHP but HTML + CSS and Javascript.
    If you want me to code it all for you...I don't work for free.

    So either you are going have to hire someone..of if some here is feeling generous (not me) they might do it all for you. I on the other hand, will only help you solve problems of existing code you have already done.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •