php photo gallery extra code needed

Reply

Join Date: Jan 2005
Posts: 1
Reputation: overload8219 is an unknown quantity at this point 
Solved Threads: 0
overload8219 overload8219 is offline Offline
Newbie Poster

php photo gallery extra code needed

 
0
  #1
Jan 14th, 2005
Hi i have this code to create a photo gallery on my website.
  1. <html> <head>
  2. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  3. <meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
  4. </head> <body bgcolor="#FFFFFF">
  5. <div align="center"><center>
  6. <?php
  7. $a = '0';
  8. $filepath = "thumb";
  9. $url_path = "main";
  10. $dir = dir($filepath);
  11. echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"5\" width=\"75%\">";
  12. while($entry=$dir->read()) {
  13. if($entry == "." || $entry == "..") {
  14. continue;
  15. }
  16. $fp = @fopen("$filepath/$entry","r");
  17. if ($a == '0') {echo "<tr>";}
  18. if ($a == '5') {echo "<tr>";}
  19. if ($a == '10') {echo "<tr>";}
  20. if ($a == '15') {echo "<tr>";}
  21. ?><td>
  22. <a href="<? echo "$url_path/$entry" ?>">
  23. <img src="<? echo "$filepath/$entry" ?>" alt="<? echo $entry ?>"></a>
  24. </td>
  25. <?
  26. $a = $a + 1;
  27. }
  28. ?>
  29. </tr>
  30. </table>
  31. </center></div>
  32. </body>
  33. </html>

i was wondernig what code would be needed to limit the gallery to only show 10 images per page and to add links at the bottom to allow progression through the gallery.

many thanks
chris
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the PHP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC