How do I validate the php response in ajax | Sololearn: Learn to code for FREE!

+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

7/23/2021 4:12:12 PM

Adewoye David Adetoye

1 Answer

New Answer

0

What is the output if you console.log the response?