Friday, January 30, 2009

[jQuery] How PHP script can return two variables ?

I use jQuery $.ajax to submit user comment to a PHP Script.

The PHP script validate the user data, if it is OK, user comment is
written to mysql database. If not it will show error message.

Now the script print error message and success message same way.

I need PHP script pass one more value, to identify it is an error or
success message.

If it is success, i need to remove the comment box.

No comments: