RE: [PHP] dynamic menu possible?

From: Date: Sun, 16 Sep 2001 17:19:00 +0000
Subject: RE: [PHP] dynamic menu possible?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-67507@lists.php.net to get a copy of this message
> What I want to do is have a drop-down menu where the options are files This is matter of HTML or JavaScript > located in a folder on the server that changes as items are added to or > removed. Then the user can select an item from the menu, submit, and that > page will load. This is script for writing all files located in a folder: $folder = "c:/borland/"; $dir = opendir($folder); while ($file = readdir($dir)) { echo $file."<br>"; } > Did that make sense? > So I have 1.htm and 2.htm and 3.htm in a folder. A selectable menu reads the > folder and lists those three files as options. The user can click on it and > submit and that page will load. And if I add 4.htm, the menu will add that > to the drop down on its own. > > That that's not possible, how close can I get to something like that? > An example of something close to that I found on www.megatokyo.com . They > have a dropdown menu where a user selects an item and gets sent to that > page. A URL from one attempts shows as > http://www.megatokyo.com/index.php?date=2001-09-04 . How is > that done? > > Again, if I could just be pointed to the related PHP concepts I'll take it > from there. Try to start here: http://www.php.net/manual/en/ref.dir.php http://www.php.net/manual/en/ref.filesystem.php Lubo

« previous php.general (#67507) next »