<?php


   global $dsn,$username,$password,$conn;

    try{

    $dsn = $_SESSION['dsn'];
    $username = $_SESSION['usuario'];
    $password = $_SESSION['password'];
    

    $dsn =str_replace('System\Config.FDB',$_SESSION['empresa'].".FDB;charset=UTF-8;role=USUARIO_MICROSIP", $dsn);
    $conn = new PDO($dsn,$username,$password);

    
    }catch(PDOException $e){
       echo "falló la conexion con la base de datos ". $e->getMessage(). "\n";
       exit;
    }

?>