<?php

class DataBase extends PDO{
    
    public $action;

    public function __construct() {
        try{
            parent::__construct('mysql:host=localhost;dbname=quimico4_mauricio_correa','quimico4_mc_admi','CO2316255129238111');
            parent::setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $this->exec("set names utf8");
        } catch (Exception $ex) {
            echo "Error al conectar a la base de datos. <br>".$ex;
        }
        
    }    
}
