I've just started learning codeigniter and struggling with ajax calls.
Found a few tutorials but can't understand how to do what I want.
I have a home_view with links, and when I click on a link I want it to fetch data from the database with the given id.
Then display a list of the records recieved from the database.
If the user clicks the Bread Rolls link, it should find all the records that belong to Bread Rolls in the products table and display them in the productsList div, in the categories_view file.
The jquery code is in the header_view file.
I am attaching my view, controller and model files.
Can someone please help?