Re: a menu item from a database, linked to a list from a another table

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

 



On Thursday 14 November 2002 23:17, chip.wiegand@simrad.com wrote:
> Jason Wong <php-db@gremlins.biz> wrote on 11/13/2002 10:46:32 PM:
> > On Thursday 14 November 2002 07:32, chip.wiegand@simrad.com wrote:
> > > Is this even possible? I have a menu that is generated from a table.
> >
> > What is your menu -- a set of <a> tags? or a selector box? I suspect you
>
> mean
>
> > the latter ...
>
> Not a list box, but a menu of about 15 category titles, all shown on the
> page in
> a list, click on category get the category items listed. Both the category
> titles
> and the individual items will come from a database.
> I am trying this to make a faq's page - list the faq categories, click on
> the
> category and get the list of faq's. The first part is easy, the second part
> is
> easy, both seperately.

Right, so make your links something like:

  http://www.example.com/faq.php?category=3

Your page then uses $_GET['category'] to builds a query to extract the items 
in the selected category.

Then it builds links which looks something like:

  http://www.example.com/faq.php?category=3&item=2


-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *


/*
"It may be that our role on this planet is not to worship God but to
 create him."
 -Arthur C. Clarke
*/


-- 
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