473,244 Members | 1,824 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,244 software developers and data experts.

how would I go about getting directory list to appear in a drop down menu

I'm working on a website for a friend, and I want to let him select an
image from a dropdown menu for his posts. how would I go about getting
that to work? I know you can echo the directory contents by using `ls -al`
could this be done the same way?

Jul 17 '05 #1
1 1354
behindspace wrote:
I'm working on a website for a friend, and I want to let him select an
image from a dropdown menu for his posts. how would I go about getting
that to work? I know you can echo the directory contents by using `ls -al`
could this be done the same way?


$handle = opendir($dir);
while($file = readdir($handle)) {
if(ereg("\.(jpg|jpeg|gif)^, $file))
print "$file<br>"; // work with the data like You want to
}

--
Sincerly
Kim Madsen
Systemdeveloper / ComX - http://www.comx.dk
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: deko | last post by:
I populate a drop-down list like this: echo "<select>"; foreach ( $ip_list as $var ) { echo "<option>"; echo $var; echo "</option>"; } echo "</select>";
1
by: Jonny Tango | last post by:
Hello everyone. Q. How do I create a dynamically-generated drop-down list for use in an array. I'm using PHP with a MySQL database (through phpMyAdmin) My database table is called...
1
by: Rod Early | last post by:
I need to know when the select element's dropdown list is opened (as when the user clicks on the arrow or does ALT-downarrow from the keyboard). Similarly, I need to known when the dropdown list...
1
by: ehm | last post by:
I apologize in advance for the cross-post (from microsoft.public.inetexplorer.scripting), but that board seems dead. I have what I think is a fairly simple problem, but I cannot figure this out....
3
by: Ken | last post by:
Hi I have a CRM system which is based on access. We use this system to automatically create all our offers and invoices etc. The problem is the offers usually look quite absurd as we have no...
2
by: Jim in Arizona | last post by:
My goal, somehow, is to populate a dropdownlist with all the user names in active directory. I don't even know where to begin, really. I added a reference to System.DirectoryServices so I could...
1
by: aimeein therough | last post by:
Hi all, I am quite the PHP idiot. I know about includes and am trying to slowly learn more but I've got to figure this out fast (as usual). I have a drop-down menu that uses CSS, combined with...
1
by: tina1223 | last post by:
I have a Javascript drop down menu in an html page which views fine in Safari & Firefox, but in IE the drop downs are cut off by the swf elements on the page which they appear over top of fine in the...
1
by: Aad vd Naad | last post by:
Hi, I have create a dropdown menu which looks as expected in Safari (Mac). Viewing it in FF (Mac) or IE6 (Windows) it's a bit messed up. It also seems that when the top level links are clicked...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.