This question already has an answer here:
I have done a pagination function with ajax, and a few minutes ago it was working fine. when I reload now it shows e an error :
Parse error: syntax error, unexpected end of file in C:\Users\User\Desktop\xampp\htdocs\tut\main.php on line 63.
I don't know maybe I have added any {","}
or (",")
in the script. I can't find where the error is. I have seen a tutorial and it's the same.
Can you guys help me? ps: I'm a beginner at PHP, AJAX.
<script>
//pagination with ajax
$(document).ready(function(){
load_data();
function load_data(page)
{
$.ajax({
url:"paginator.php",
method:"POST",
data:{page:page},
success:function(data){
$('#pagination_data').html(data);
}
})
}
$(document).on('click', '.pagination_link', function(){
var page = $(this).attr("id");
load_data(page);
});
});
</script>
</div>