i have been working on making a login portal and i successfully make a login page,web server to handle the login data with the ability of replying that the user is been registered with us or wrong password and many more fields are there. But my question to you everyone guys is that the php server is replying the output in the form of JSON,and when i click on login button the following output comes {"status":1,"logStatus":1,"name":"Akheel"} where //Status Codes // 0 = Server Side Error // 1 = Server Working as Expected //Login Codes // -2 = Missing Inputs // -1 = Username does not exist in DB // 0 = Password does not match // 1 = Successful Login // 2 = Login matches but user not confirmed so my question is how to handle this json reply in html page so that i can succesfully open my next page if logstatus is 1 and do something in other cases.
Aucun commentaire:
Enregistrer un commentaire