0

I encountered this error while I was trying to create a dynamic web page. I am really new at PHP AJAX JS MySQL json. The error occurs at specifically at line with Grade': $('#Grade').val()

$('form').submit(function(event) { 
    $('#std_id + .throw_error').empty(); 
    $('#std_name + .throw_error').empty(); 
    $('#Grade + .throw_error').empty(); 
    $('#Age + .throw_error').empty(); 
    $('#Phone + .throw_error').empty(); 
    $('#success').empty();
var postForm ={
    'std_id': $('#std_id').val(),
    'std_name': $('#std_name').val()
    'Grade': $('#Grade').val(),
    'Age': $('#Age').val()
    'Phone': $('#Phone').val()
    
};
iM COCO
  • 1
  • 1

1 Answers1

2

You are missing a comma after 'std_name': $('#std_name').val(). And also another one a few lines down.

just add those in.

    var postForm ={
    'std_id': $('#std_id').val(),
    'std_name': $('#std_name').val(),
    'Grade': $('#Grade').val(),
    'Age': $('#Age').val(),
    'Phone': $('#Phone').val()

};
ThomasK
  • 300
  • 1
  • 8