Re: related combo boxes

From: Date: Sun, 16 Jul 2000 21:21:29 +0000
Subject: Re: related combo boxes
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-6845@lists.php.net to get a copy of this message
David Metzler wrote: > I'm new to web programming so this question while it makes sense to me may > be a bad question. If so feel free to straighten me out. I have however > programmed for a while with older languages. > > Let's say I have two combo boxes on a web page. For example: Music Artists: > and Songs: > The idea is to have the user select the artist then use that answer in a > dynamically generated where clause of a sql query to populate the list in > the song control. > > I've been told that due to the stateless nature of web servers in general > and Apache specifically the history of the first artist selection is lost. > > The sugestion was to use javascript. > > I'm trying to visualize this in my head and so far have the following > questions. > > 1. Is this true and if so what would this javascript do exactly and what > would the code look like? > 2. Are cookies an alternative. > 3. What about the new session managment in PHP4. Could that be used somehow > to eliminate the need for javascript? > 4. If there is more than one way to do this what are the advantages and > disadvantages of the possible solutions? > My solution to this would be something like this: You make a box that request the artist or the song and let the user press a button. Then you give the variable to a list.php?artistname and do a sql query with the artist name in that php file.

« previous php.general (#6845) next »