<?php

class DB
{

    public static $con;


    public static function conecta()
    {


        $host = "localhost";
        $db = "imofficer";
        $user = "root"; // Replace with your database username
        $pass = ""; // Replace with your database passwordinclude "../config.php";


        try {

            $con = new PDO("mysql:host=$host;dbname=$db", $user, $pass);
            // $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
            return $con;
        } catch (PDOException $e) {

            return die($e->getMessage());
        }
    }
}
