Hey guys I have a scenario,
I want to use the ajax $.get method to target a certain PHP function in a separate PHP file. I am not too sure about the syntax.
The Javascript
function all(){
$.get({
url: "functions.php THEN GET A CERTAIN FUNCTION ",
success: function success(data){ paint(data) },
dataType: "html"
});
});
function.php
<?php
function helloWorld(){
echo "Hello World";
};
function helloMars(){
echo "Hello Mars";
};
Any help greatly appreciated