I'm trying to call a php function that is defined on a php file.
On the php file I have this that will call the function
if(isset($_GET))
{
submit(); //Do something with your GET
}
But I'm getting an error when calling the php function within the jquery. I imagine it could be a path problem. The jquery file is in js/file.js and the php function is on data/php/function.php so I try it calling it like this.
$.ajax({
url: "../data/php/functions.php&paperid="+$('#table-paperid').text(),
type: "GET",
success:function(result)//we got the response
{
alert('Successfully called');
},
error:function(exception){alert('Exception:'+exception);}
});
But no matter what I write on the url I always get the exception error. Any ideas?
&in your URL be an??