RSS Forums RSS

php photo gallery extra code needed

Reply
Posts: 1
Reputation: overload8219 is an unknown quantity at this point 
Solved Threads: 0
overload8219 overload8219 is offline Offline
Newbie Poster

Solution php photo gallery extra code needed

  #1  
Jan 14th, 2005
Hi i have this code to create a photo gallery on my website.
<html>  <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage Express 2.0">
</head> <body bgcolor="#FFFFFF">
<div align="center"><center>
<?php
$a = '0';
$filepath = "thumb";
$url_path = "main";
$dir = dir($filepath);
echo "<table border=\"0\" cellpadding=\"5\" cellspacing=\"5\" width=\"75%\">";
while($entry=$dir->read()) {
    if($entry == "." || $entry == "..") {
        continue;
    }
    $fp = @fopen("$filepath/$entry","r");
if ($a == '0') {echo "<tr>";}
if ($a == '5') {echo "<tr>";}
if ($a == '10') {echo "<tr>";}
if ($a == '15') {echo "<tr>";}
?><td>
  <a href="<? echo "$url_path/$entry" ?>">
  <img src="<? echo "$filepath/$entry" ?>" alt="<? echo $entry ?>"></a>
  </td>
<?
$a = $a + 1;
}
?>
</tr>
</table>
</center></div>
</body>
</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
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Similar Threads
Other Threads in the PHP Forum
Views: 3752 | Replies: 0 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 10:08 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC