I know this has been asked on here but none of the answers I found answered my question.
I have a PHP/HTML file that the users view. When they click on a button, it creates a JS variable which I would like translated into a PHP variable. Using that variable, I would like to update the contents of a div box by calling a PHP function which populates the box with info from the server.
My questions: Can this be done with only 1 php file? Do I have to have the user reload the page after I refresh the content? What is the best way to do this?