related combo boxes
| From: | David Metzler | Date: | Sun, 16 Jul 2000 17:34:40 +0000 |
| Subject: | related combo boxes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-6832@lists.php.net to get a copy of this message | ||
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?