Re: Auto populate subcategory select box based on category choosen
| From: | Ben Curtis | Date: | Wed, 06 Dec 2000 19:28:37 +0000 |
| Subject: | Re: Auto populate subcategory select box based on category choosen | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28957@lists.php.net to get a copy of this message | ||
You might check out the following devshed article for a start: http://www.devshed.com/Server_Side/MySQL/JS_Arrays/
On Tue, Dec 05, 2000 at 11:20:08AM -0700, David wrote:
> How do I populate 2nd select box that holds subcategories based on previous
> select box which contains (categories). I need a simple example.
>
> Example:
>
> Select box 1 contains:
>
> Select your OS:(categories)
> Linux
> Windows
>
> Lets say user chooses Linux
>
> Select Box 2 (autopopulates with subcategories for Linux loaded from
> database: )
>
> program 1 for Linux
> program 2 for Linux
>
> Select box 1 contains categories and select box two will populate with
> subcategories based on the category choosen loaded from a MySQL database.
> The data is stored in a single database called database1 using one table
> that contains category and subcategory.
>
> I know I have to use javascript but I need a very simple example on how to
> do this.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net