communicating with the database
Moderator: General Moderators
communicating with the database
i have 2 combo boxes in html,the first contains the field called categories and the second sub categories. When i select any category from categories i must get the particular subcategories in the subcategory combo box.I have a table for category and a different table for subcategory but i have category id in the sub category.
You need something like this:
populate categories dropdown from categories table and subcategories dropdown with the subcategories corresponding to default category. Then in onChange event attached to categories dropdown you need to post the form, so it reloads and populates the subcategories dropdown with the subcategories corresponding to selected categories.
Now you have an idea and can start coding.
populate categories dropdown from categories table and subcategories dropdown with the subcategories corresponding to default category. Then in onChange event attached to categories dropdown you need to post the form, so it reloads and populates the subcategories dropdown with the subcategories corresponding to selected categories.
Now you have an idea and can start coding.