<?php
class dbCon {
    protected $pdo;    
    
   

        const HOST="fertimicro.veriomysql.com";
     const DB="pitayaor_ferti";
     const USER="pitayaor_ferti";
     const PASS="fertizam";

    /**
     * Constructor de clase
     */

    function __construct() {
        try {
            $pdo= new PDO('mysql:dbname='.self::DB.';host='.self::HOST,self::USER,self::PASS);
            $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            $pdo->exec("set names utf8");
            $this->pdo = $pdo;
        } catch (PDOException $e) {
            echo 'Error (0x00001): ' . $e->getMessage();
        }  
    } 

    function connect(){
        return $this->pdo;
    }
    
}

?>
