I have a question regarding, PHP functions, jQuery and AJAX. If I have a button in my php index like this:
<input type="submit" value="Download" id="download"/>
And I have another php file (dubs.php) that contains this:
<?php
function first(){
echo 'first';
}
function second(){
echo 'second';
}
?>
And my jQuery, like this:
$(document).ready(function(e) {
$("#download").click(function(){
$.ajax({
type: "GET",
url: "dubs.php",
});
});
});
How do I tell my AJAX request to select for example the second function?
I have no idea on how to do this, I've tried it with "success: first()" or with "success: function(){ first() }" but that did not work.