Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- | category_id | category_name | parent_id
- | 1 | Electronics | 0
- | 2 | Mobile Phones | 1
- | 3 | Computers | 1
- | 4 | Iphone | 2
- | 5 | Samsung Galaxy| 2
- | 6 | Asus Laptop | 3
- 1. User choose a category from the first selectbox
- 2. Send ajax to getcategory.php
- 3. getcategory.php finds out if there is any child category from the user-chosen first category.
- 4. ajax receive data from getcategory.php
- 5. if data exist, jQuery create a new select box and put in the fetched data into it.
- 6. User choose sub-category from the just added selectbox
- 7. Send ajax to getcategory.php
- 8. getcategory.php finds out if there is any more child category from the user-chosen sub-category.
- 9. ajax receive data from getcategory.php
- 10. if data exist, jQuery create a new select box and put in the fetched data into it.
- 11. and so on.. until the selectbox have no child category.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement