How to modify a directory lister to my needs...?

ok, I found this directory lister (thank you nobody)

but I need to change it somehow. not sure though.

what i am tryint to do is allow the user to check box a box with the file they want to edit in the value…
then press submit and be taken to edit.php to edit it…

how would i change the dir index to do that?

dir code


<?php

//define the path as relative
$path = "../../";

//using the opendir function
$dir_handle = @opendir($path) or die("Unable to open $path");


//running the while loop
while ($file = readdir($dir_handle)) 
{
   if($file!="." && $file!=".." && $file!="admin")
      echo "{$file}";

;
}
//closing the directory
closedir($dir_handle);

?>