2 Replies - 259 Views - Last Post: 18 April 2012 - 01:00 AM

#1 Madhya  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 14-March 12

retrieving images from database and displaying all on a page

Posted 17 April 2012 - 11:36 AM

I have 5 attachments whose paths are stored in database (5) columns. I am retrieving the paths as follows for the first file.

$path1=$rowArray['file1'];
$path2=$rowArray['file2'];
<?php printf('<a href="%s" >View all Files</a>',$path1); ?>

where
$path1
is the path of the first file, and by clicking on View all Files, the image is shown on the next page.

I want to show all the 5 images on the same page under View all Files links.

How can i do it. Hope u all understand. I have applied a loop to show, them all, but it doesnot help. Please provide me a valid solution for this.

Is This A Good Question/Topic? 0
  • +

Replies To: retrieving images from database and displaying all on a page

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4334
  • View blog
  • Posts: 12,128
  • Joined: 18-April 07

Re: retrieving images from database and displaying all on a page

Posted 17 April 2012 - 12:16 PM

Still a little bit unclear as to what you want to do. Typically you loop through the array you have there and print each <img> tag with the "src" set to its path. When you click the link you want it to scroll open and show the other images? Or are you just simply wanting all five images to be shown?

Please elaborate on how you want it to display. Screenshot may help. :)
Was This Post Helpful? 0
  • +
  • -

#3 Atli  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 3719
  • View blog
  • Posts: 5,990
  • Joined: 08-June 10

Re: retrieving images from database and displaying all on a page

Posted 18 April 2012 - 01:00 AM

Madhya, do not double post your question. If you want to continue discussing this topic please do so in your existing thread.

* Thread closed *
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1