<?php
$db_name = 'sgi';
try {
    $pdo = new PDO("pgsql:host=200.13.89.27;port=5432;dbname=" . $db_name, "alumnos_usr", "4lUmn0$.bd");
    //$pdo = new PDO("pgsql:host=200.13.89.8;port=5432;dbname=" . $db_name, "alumnos_usr", "4lUmn0$.bd");
} catch (PDOException $e) {    
    if (session_status() == PHP_SESSION_NONE)
        session_start();
    $_SESSION = array();
    $_SESSION['msg'] = '<p><i class="text-warning ing-importante mr-1"></i><span class="text-primary">Importante<span></p><p>Se presentó un problema interno en el sistema, por favor vuelve más tarde.</p>';
    $_SESSION['error'] = $e->getMessage();
    header('Location: http://localhost/alumnos/error.php');
    exit();
}
unset($db_name);
