<?php
// Database credentials
$host = 'localhost';
$dbname = 'wwwgrandecosrl_Ventas'; // CHANGE THIS
$user = 'wwwgrandecosrl_nelson';       // CHANGE THIS
$pass = 'Latco.2025';       // CHANGE THIS

// Attempt to connect to the database
try {
    $pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $user, $pass);
    // Set PDO attributes to throw exceptions on errors
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
    die("Connection failed: " . $e->getMessage());
}
?>