Jump to content

Folder List Drop-Down


jdavis

Recommended Posts

Hello,

 

I am developing a PHP/MySQL project and as part of my initial setup and configuration scripts, the users can select a skin for the application, and a variable value ($skin) is updated to set the current skin, this works ok on it's own, but currently the user must manually type the skin name in a free-text box.

 

Ideally this needs to be a drop-down option box, and I would like this to be populated by listing the sub-folders within the '/skins' folder, so that it's always up to date. The folder structure looks like this:

 

/skins

/skins/skin1

/skins/skin2

/skins/skin3

 

How can I use PHP to generate a list of the current sub-directories in 'skins' and populate the drop-down list?

 

thanks, Jonathan

Link to comment
https://forums.phpfreaks.com/topic/77924-folder-list-drop-down/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.