hi all,
im currently using this code to seach through a folder for all the files and then display them as links:
<title>Photo's</title>
<body text="black" link="black" alink="black" vlink="black">
<?php include("menu.php"); ?>
<div align="center">
<h3>Photo's page</h3>
<table border="1" callpadding=\"0\" cellspacing=\"0\"><tr>
<?php
$num =0;
if ($handle = opendir('.')) {
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != ".." && $file != "index.php" && $file !== "view.php" && $file !=="menu.php") {
if($num !== 4)
{
$list ="<td align=\"center\" valign=\"middle\"><table border=\"1\" width=\"100\" callpadding=\"0\" cellspacing=\"0\">";
$list.="<tr><td align=\"center\" width=\"100%\" height=\"100%\" align=\"center\" valign=\"middle\">";
$list.="<a href=\"view.php?pic=$file\"><h4>$file</h4><img src=\"$file\" height=\"75\" width=\"75\" border=\"0\"></a>";
$list.="</td></tr></table>";
$list.="</td>";
echo $list;
$num =$num + 1;
}
else
{
$list ="</tr><tr><td align=\"center\" valign=\"middle\"><table border=\"1\" width=\"100\" callpadding=\"0\" cellspacing=\"0\">";
$list.="<tr><td align=\"center\" valign=\"middle\" width=\"100%\" height=\"100%\">";
$list.="<a href=\"view.php?pic=$file\"><h4>$file</h4><img src=\"$file\" height=\"75\" width=\"75\" border=\"0\"></a>";
$list.="</td></tr></table>";
$list.="</td>";
echo $list;
$num ="1";
}
}
}
closedir($handle);
}
?>
which then passes to this code which displays the the image.
<body text="black" link="black" alink="black" vlink="black">
<title>ATC Photo's - <?echo $pic; ?></title>
<table border="1" cellpadding="0" cellspacing="0" width="100%" height="100%"><tr>
<td align="center" valign="middle">
<?php include("menu.php");?>
<h4><?echo $pic; ?></h4><img src="<?echo $pic; ?>">
</td></tr></table>
What i would like to know, is there any way of from the second page to add a 'Next' button so i can scroll through the files.
Thanks