Reply to Re: Populate picklist from directory and return file name

Your name:

Reply:


Posted by sunbum on 09/14/05 19:29

Thanks Sandman,

Could you glance at this and see if I'm going in the right direction?

<?php
<html>
<head><title>Cooler Log Graph</title></head>
<body>


<form action="coolerlinec.php" method="post">;
# Directory
$dir = "/inetpub/wwwroot/templogs/";

print "<select name='file'>";
$dir = opendir($dir);
while (false !== ($file = readdir($dir))){
if (in_array($file, array(".", ".."))) continue;
print "<option value='$file'>$file</option>";
}
print "</select>";


<input type="submit" value="Submit">;
</form>

</body>
</html>
?>

Thanks again!

Anyone else is more than welcome to chime in too! The main function is
from "Sandman" and works great, I am now just trying to incorporate it
into a form. Obviously I am greener than grass ;)

Mike

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация