Fill select boxes with dependent data from a database. How?
| From: | Marco Viehl | Date: | Mon, 18 Mar 2002 14:46:37 +0000 |
| Subject: | Fill select boxes with dependent data from a database. How? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-17733@lists.php.net to get a copy of this message | ||
Hi all,
i am searching for a solution for filling 2 (or 3) dependent select boxes
with values from a database.
That means, when you select a value in selectbox 1 the options for the
second selectbox should be filled with values related to select box 1.
Short example
Value for box 1 Value for box 2
1 a
1 b
1 c
2 d
2 e
2 f
If you now select "1" in select box 1 then you should only see "a","b"
and
"c" in selectbox 2.
Was that clear? I hope so.
Does anybody has a solution for this situation? Or maybe sample code?
Thank you in advance for any help.
Kind regards and greetings from Cologne/Germany,
Marco.
mviehl@gmx.de