|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Hello,
Here comes today's newbie question... Some will laugh and see this sooooo easy... But I'm stuck... I am working on a form (page1.php) with username and password, no problem so far... On this same page (and once username and password are validated, so far I managed), the user must be able to select a file from a file list, in a menu like this: <select name="file"> <option value="empty">Select a file</option> <option value="file1">File 1</option> <option value="file2">File 2</option> etc... The files are stored in a folder (./folder). But in this folder I have many files, .txt or .jpg, and I only want to display the .txt files. I can do all this in html, no problem, and display the file on a page2.php, but it means I have to manually type as many <option value="etc"...> as there are files in this folder. And there are many! I assume there must be a way to retrieve all the .txt files and display them in a drop down/select menu for selection, yes? How can I do that? I read something about traversing a directory (rewind() and dir()) but I don't know how to use these functions and diplay the files in a select menu... Could anyone help me? Thanks for your patience with newbies! A.
__________________
http://www.aventurevoyages.com |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |