Answer the question
In order to leave comments, you need to log in
Should I use json?
Hello. I do Api for everything at once :) (in the Ajax browser on client devices)
There is an authorization check.
If the user is authorized, it displays yes; if not, it displays no.
In js I do something like this :)
$.ajax({
type: "POST",
url: "/api/reg/ssesid.php",
data: $('#logform').serialize(),
traditional: true,
success: function(resp) {
if (resp == 'yes') {
location="/game/index.html";
} else if (resp == 'no') {
} else alert(resp);
},
error: function(resp) {
alert('error');
}
});
Answer the question
In order to leave comments, you need to log in
Should I use json?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question