<?php session_start(); include_once './class/Connection.php'; include_once './class/Users.php'; include_once './class/UsersDAO.php'; $error = 1; if ($_POST) { $con = Connection::getInstance(); $user = new Users($_POST['user'], md5($_POST['pass'])); $userDAO = new UsersDAO($con); $rows = $userDAO->checkAccess($user); if ($rows) { $user->initSession(); header("location: index.php"); } else { $error = 2; } } ?> <!doctype html> <html lang="es"> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>My Bootstrap Integration Loggin</title> <link rel="stylesheet" href="assets/bower_components/bootstrap/dist/css/bootstrap.min.css" /> <link rel="stylesheet" href="assets/bower_components/bootstrap/dist/css/bootstrap-theme.min.css" /> <script src="assets/bower_components/jquery/dist/jquery.min.js"></script> <style rel="stylesheet"> .jumbotron{ max-width: 550px;