RE: [PHP] build menu with mysql data
| From: | (Edward Peloke) | Date: | Tue, 21 Jan 2003 19:15:04 +0000 |
| Subject: | RE: [PHP] build menu with mysql data | ||
| References: | 1 | Groups: | php.db php.general |
| Request: | Send a blank email to php-general+get-132482@lists.php.net to get a copy of this message | ||
Marc,
I did something sort of along these lines with an 'auction' site I worked
on. I displayed rows from a db. If the row had bid information in the db
(or your case submenu info) then a + sign icon was displayed next to it. IF
the plus sign was clicked, the page would reload and the bid or submenu info
would be displayed and the + sign would change to a - sign to give the
appearence of a tree menu. Can you post some of your code?
Eddie
-----Original Message-----
From: Marc Bleuler [mailto:marc@bleuler.net]
Sent: Tuesday, January 21, 2003 12:31 PM
To: php-db@lists.php.net; php-general@lists.php.net
Subject: [PHP] build menu with mysql data
Hi,
I would like to bild a tree menu with mySQL data. where I have the collapsed
main menue and when I click the link the specific submenue expands (as
follow).
(collapsed Main Menu)
+ Home
+ Downloads
+ About me
+ Search
....and for example if I click the "Download" section it will look as
follow....
(expanded Main-Sub Menu)
+ Home
+ Downloads
- Music
- Programm
+ About me
+ Search
....and the SQL Tables...
MAINMENUE_TABLE
ID NAME
-----------------------------
| 1 | Home |
| 2 | Downloads |
| 3 | About me |
| 4 | Search |
....and....
SUBMENUE_TABLE
ID MAIN_ID NAME URL
-------------------------------------------------------------------
| 1 | 2 | Music |
./somefile.php?action=music
| 2 | 2 | Programm |
./somefile.php?action=programm
| 3 | 3 | Pictures |
./somefile.php?action=pictures
| 4 | 3 | Address |
./somefile.php?action=address
| 5 | 4 | My Page |
./somefile.php?action=mypage
| 6 | 4 | The Web |
./somefile.php?action=theweb
| 7 | 4 | Google |
./somefile.php?action=google
If I'm using a while loop it won't work, so I realy don't have and more
ideas...
Please consider in your explanations I'm a PHP beginner... :-)
thanks
Marc
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php