Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once 'includes/constants.php';
- class Mysql {
- private $conn;
- function __construct() {
- $this->conn = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or
- die('Problema conectando con la base de datos.');
- }
- function verify_Username_and_Pass($un, $pwd) {
- $query = "SELECT *
- FROM Usuarios
- WHERE User = ? AND Password = ?
- LIMIT 1";
- if($stmt = $this->conn->prepare($query)) {
- $stmt->bind_param('ss', $un, $pwd);
- $stmt->execute();
- if($stmt->fetch()) {
- $stmt->close();
- return true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement