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

**URL:** https://forum.kirupa.com/t/how-to-modify-a-directory-lister-to-my-needs/234630
**Category:** Uncategorized
**Created:** [August 3, 2007, 10:59pm UTC](https://forum.kirupa.com/t/how-to-modify-a-directory-lister-to-my-needs/234630 "2007-08-03T22:59:01Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)
#### Post date: [August 3, 2007, 10:59pm UTC](https://forum.kirupa.com/t/how-to-modify-a-directory-lister-to-my-needs/234630/1 "2007-08-03T22:59:01Z")

</div>

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

<?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);

?> 

```
