I'm trying to find out a way to list all files in a directory with links to something like "index.php?client=$filename
$filename would equal the filename in the directory, and it will repeat that for every file.
try
<?php $handle=opendir('../data/'); if (!isset($file)) $file = "page1"; while (false!==($file = readdir($handle))) { if ($file != "." && $file != "..") { echo "<A href='myscript.php?file=$filename' target='_blank'>$filename</A><br>\n"; } } closedir($handle); ?>