Advertisement
Guest User

Untitled

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