I need to run some PHP function when a button is clicked. I know this is not supposed to be php\'s use, rather js should do it, but what my functions are doing in gathering data
Use an AJAX Request on your PHP file, then display the result on your page, without any reloading.
http://api.jquery.com/load/ This is a simple solution if you don't need any POST data.