<?php
//	$conexion=mysqli_connect ("localhost", "coopserp_qr_carnet", "BDqr_carnet");
//	mysqli_select_db ($conexion, "coopserp_qr_carnet") or die ("Error: No es posible establecer la conexion");
	
$host     = 'localhost';
$username = 'coopserp_qr_carnet';
$password = 'BDqr_carnet';
$db       = 'coopserp_qr_carnet';


try {
    $connection = new PDO("mysql:dbname=$db;host=$host", $username, $password);
    $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    echo "ERROR: " . $e->getMessage();
}
?>