I am a newbie in programming and I am learning php mvc without any framework, my questions are, should I ask the model or the controller ?, and what script should I load with jquery to get that data without reloading the page?
I am a newbie in programming and I am learning php mvc without any framework, my questions are, should I ask the model or the controller ?, and what script should I load with jquery to get that data without reloading the page?
Database queries are made in the MODEL layer. While you can implement MVC from scratch, there are some frameworks that can help you to use MVC in php, such as codeigniter, laravel, phalcon, etc. MVC Framework: link
To obtain the data without reloading the page you use AJAX, jQuery you have different ajax functions that will simplify you and facilitate the use of ajax, such as $ .ajax, $ .get, $ .post, etc. This link can give you more reference: link
Luck.
The queries to the Database are made in the Model, the controller contains the necessary code to respond to the actions that are requested in the application. However you could find that in google, this website is to help resolve code errors, so I urge you not to ask questions of that style. The community has a very good disposition in that sense, they have always helped me: D. I hope it serves you.