<?php
	class Database {
		private $servidor = "localhost";
		private $usuario = "root";
		private $password = "";
		private $database = "dbbuesimples";
		
		protected function connect(){
			try {
				//data source name - dsn
				$dsn = 'mysql:host=' . $this->servidor . '; dbname=' . $this->database;
				$pdo = new PDO($dsn, $this->usuario, $this->password);
				$pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
				return $pdo;
			} catch (PDOException $e) {
				print "Error!: " .$e->getMessage() . "<br/>";
				die();
			}
		}
	}