I'm learning about JS and its ability to call PHP scripts that enable you to reload parts of a website without having to load the entire page again.
I have looked at some other answers such as this one:
HTML - Change\Update page contents without refreshing\reloading the page
While I read these replies I was wondering: What are the risks involved when using these techniques? Is it not dangerous security-wise to call other scripts that then directly call the db?
Also: What is the best approach to go about it. Are there libraries that help you do the job?