RE: [PHP] build menu with mysql data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux