Advertisement
Guest User

Untitled

a guest
Jun 6th, 2018
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.56 KB | None | 0 0
  1. <?php
  2.     include "connection.php";
  3.    
  4.     $username = $_POST['username_app'];
  5.     $password = $_POST['password_app'];
  6.    
  7.     $sql = "SELECT * FROM tb_login WHERE usernameLogin = ".$username." AND passwordLogin = ".$password;
  8.     $stmt = $connect->query($sql);
  9.    
  10.     $returnapp = array();
  11.    
  12.     while($c = $stmt->fetch(PDO::FETCH_OBJ)) {
  13.         $returnapp[] = array("idLogin"=>$c->idLogin, "UsernameLogin"=>$c->usernameLogin, "passwordLogin"=>$c->passwordLogin, "emailLogin"=>$c->emailLogin);
  14.     }
  15.    
  16.     echo json_encode($returnapp)
  17.    
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement