I'm trying to make a basic MailChimp signup form by using their API. I got a easy way from stackoverflow answer and I was follow code same to same. Hope everything is ok but when trying to submit form then data not sending. I saw a JSON error by inspect element.
Here the stackoverflow answer link: Create a basic MailChimp signup form using their API
Here the JSON error message get by console:
Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse (<anonymous>)
at Function.n.parseJSON (jquery-2.2.4.min.js:4)
at Object.success (index.html?fname=AB&lname=Stevens&email=absiddiknmh%40gmail.com&submit=Submit:23)
at i (jquery-2.2.4.min.js:2)
at Object.fireWith [as resolveWith] (jquery-2.2.4.min.js:2)
at z (jquery-2.2.4.min.js:4)
at XMLHttpRequest.<anonymous> (jquery-2.2.4.min.js:4)
n.parseJSON @ jquery-2.2.4.min.js:4
success @ index.html?fname=AB&lname=Stevens&email=absiddiknmh%40gmail.com&submit=Submit:23
i @ jquery-2.2.4.min.js:2
fireWith @ jquery-2.2.4.min.js:2
z @ jquery-2.2.4.min.js:4
(anonymous) @ jquery-2.2.4.min.js:4
Please anyone can give me idea why showing this error ?