Ajax drop down menu

Hello guys,

I am trying to make an ajax drop down menu which takes 4 categories of cooking materials and when one category is clicked ,display the corresponding materials of that specific category.
After that by clicking add the material to the receipt and store in DB
Please I need guidance!
Any opinion is much appreciated!

You will need to use Pjax.


$parentList = getParentList();

$form posts the parent;

$child = getChildList($_GET[‘parent’]) ?? ‘’;