html...
Code: Select all
(test.php)
<form action="done.php" method="post">
<select name = input>
<?
$dir = "/web/directory/"; //sets directory path
// Open a known directory, and proceed to read its contents
if (is_dir($dir))
{
if ($dh = opendir($dir))
{
while (($file = readdir($dh)) !== false) //while files and folders are being read
{
if (filetype($dir . $file) == dir) //if the filetype is a directory and not a file
{
echo '<option>'.$file.'</option>';
}
}
closedir($dh);
}
}
?>
</select>
<input type="submit" value="Edit">
----------------------------------------------------------------
(done.php)
<html>
<form>
<input type="text" value="<?echo $_POSTї"input"]; ?>">
</form>
</html>Can anyone give me any pointers?
Thanks!