ok, thanks for the help previous. ok when i go and load the code it just displays the prev/next links it doesnt get the directory contents displaying the 20 links. any ideas?
<?
$MYFILENAME = "format.php";
$FILESDIR = "videos/";
$OFFSETNUM = 20;
$files = dir($FILESDIR);
if (isset($_REQUEST[offset]))
{
$offset = $_REQUEST[offset];
}
else
{
$offset = 0;
}
for ($i=$offset; $i<=sizeof($files); $i++)
{
echo "<a href='$FILESDIR/$files[$i]'>$files[$i]</a><br/>";
}
if ( ($offset - 20) >= 0 ) { $prevoffset = $offset - 20; } else { $offset = 0; }
if ( ($offset + 20) <= sizeof($files) ) { $nextoffset = $offset + 20; }
echo "<a href='$MYFILENAME?offset=$prevoffset'>prev 20</a> | ";
echo "<a href='$MYFILENAME?offset=$nextoffset'>next 20</a>";
?>
thanks guys.