I have following code:
<script>
$.post('http://localhost/app/user.php', {acao: acao}, function(retorna){
$("#demo").html(retorna);
if(retorna == "sucesso") {faça x}
});
</script>
However, in user.php
it returns several echo
of conditions if
. So if I have in PHP, for example, echo "sucesso";
and other echo "sucesso";
it returns successes success .
I would like to know how I can get each of this return separately?