Lets say i have a ajax method which call a script that checks if a user exists in the database.
What is best to be returned from the server side code?. Should I Just make an echo “notfound” and then compare the response in the javascript, return a json object or any other suggestion?
Lets say i have a ajax method which call a script that checks if
Share
I would just return a 1 or a 0 given the boolean condition, minimize your overhead, then use JSON for more complex results.