Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include 'config.php';
- if(isset($_POST['username']) && isset($_POST['password']))
- {
- $result='';
- $username = $_POST['username'];
- $password = $_POST['password'];
- $sql = 'SELECT * FROM tbl_login WHERE email = :username AND password = :password';
- $stmt = $conn->prepare($sql);
- $stmt->bindParam(':username', $username, PDO::PARAM_STR);
- $stmt->bindParam(':password', $password, PDO::PARAM_STR);
- $stmt->execute();
- if($stmt->rowCount())
- {
- $result="true";
- }
- elseif(!$stmt->rowCount())
- {
- $result="false";
- }
- echo $result;
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement