Server-Side Functions with AJAX

Sample Image

Hey everyone. I’m trying to figure out the most efficient way to call a PHP function with jQuery. I thought you guys might be able to offer your own methods.

At the moment, I’m doing…

$.post(
'pageToLoad.php',
{ func: 'doSomething' },
function(results) {
console.log(results)
});

More…