I have received the following error:
Uncaught SyntaxError: Unexpected token :
For this line:
data: userCoupon: $('#couponCode').val(),
Below is the script:
$(function() {
$("#signInButton2").click(function(){
$.ajax({
type:'POST',
url:'coursePayment.php',
data: userCoupon: $('#couponCode').val(),
success: function(data){
alert(data);
}
});
});
});