Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "connection.php";
- $json = file_get_contents('php://input');
- $obj = json_decode($json,true);
- $email = $obj['email'];
- $password = $obj['password'];
- if($obj['email'] != ""){
- $result = $mysqli->query("SELECT* FROM users WHERE Username = '$email' AND Password = '$password'");
- if($result->num_rows == 0){
- echo json_encode("Wrong details");
- }else{
- echo json_encode("OK");
- }
- }else{
- echo json_encode("Try again");
- }
- /*echo json_encode(array(
- 'message' => 'The message has been been returned from backend'
- ));*/
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement