<?php include "header.inc"; $dir = "/dir Name/"; if (is_dir($dir)) { if ($dh = opendir($dir)) { while (($file = readdir($dh)) !== false) { if (($file != "..") || ($file != ".") { echo("<a href=\"/index.php?selectusername=$file\">$file 's Photo page</a> <br>\n"); } } closedir($dh); } } ?>