This javascript is for a "load more" functionality. That grabs a fixed number of elements from load.php when a button #moreg is clicked.
$(function(){
$("#moreg").click(load);
var countg = -1;
load();
function load() {
var num = 1;
countg += num;
$.post( "load.php",
{'start_g': 'countg', 'name':'<?=$name?>' },
function(data){
$("#posts").append(data);
}
);
}
});
in load.php simply doing a var_dump($_POST['start_g']);
yields a null variable.
Not too helpful...what am I doing wrong?
var_dump($_POST)?