Re: Grabbing all files and adding to select boxes...
| From: | Richard Lynch | Date: | Sat, 01 Sep 2001 00:48:31 +0000 |
| Subject: | Re: Grabbing all files and adding to select boxes... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-65575@lists.php.net to get a copy of this message | ||
echo "<SELECT>\n";
$dir = opendir('/path/to/images/dir') or die("Could no open images dir.");
while ($d = readdir($dir)){
if ($d != '.' && $d != '..'){
echo "<OPTION>$d</OPTION>\n";
}
}
echo "</SELECT>\n";
--
WARNING richard@zend.com address is an endangered species -- Use
ceo@l-i-e.com
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Jeff Lewis <jeff@hyrum.net>
Newsgroups: php.general
To: <php-general@lists.php.net>
Sent: Thursday, August 30, 2001 12:24 PM
Subject: Grabbing all files and adding to select boxes...
I want to open a particular directory that stores images and I want the
images to be added to drop down box, was wondering if someone could help me
with some code for that. I want to set it up this way so that people can
just upload images there and they would be available on each load of the
page.
Jeff