+ 1

How do I validate the php response in ajax

I created a form that sends data to the php file on submit, and I expect it to return a value, and so I can validate that it was successful, I tried using the ajax success: function(response) { with an if statement that checks the response}; but the if statement keeps returning false. How do I fix this? https://code.sololearn.com/wWjWcT9DMpB8/?ref=app https://code.sololearn.com/WGxz8fn4j2ab/?ref=app

23rd Jul 2021, 4:12 PM
Adewoye David Adetoye
Adewoye David Adetoye - avatar
1 Odpowiedź
0
What is the output if you console.log the response?
24th Jul 2021, 4:08 AM
Nico Ruder
Nico Ruder - avatar