Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "connection.php";
- $username = $_POST['username_app'];
- $password = $_POST['password_app'];
- $sql = "SELECT * FROM tb_login WHERE usernameLogin = :USERNAME AND passwordLogin = :PASSWORD";
- $stmt = $connect->query($sql);
- $stmt->bindParam(':USERNAME', $username);
- $stmt->bindParam(':PASSWORD', $password);
- $stmt->execute();
- if($stmt->rowCount() > 0) {
- $c = $stmt->fetch(PDO::FETCH_OBJ);
- $returnapp = array("idLogin"=>$c->idLogin);
- } else {
- $returnapp = array("Erro"=>"erro");
- }
- echo json_encode($returnapp);
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement