<?php
// db_connect.php

$servername = 'localhost';
$username   = 'iktechnco_splashjet';
$password   = 'iktechnco_splashjet';
$dbname     = 'iktechnco_splashjet';

// 1. MySQLi Connection (for your popup banner script)
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
    die("Database Connection failed: " . $conn->connect_error);
}
$conn->set_charset("utf8mb4");

// 2. PDO Connection (for your add_offer script)
try {
    $dsn = "mysql:host=$servername;dbname=$dbname;charset=utf8mb4";
    $pdo = new PDO($dsn, $username, $password, [
        PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION,
        PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
        PDO::ATTR_EMULATE_PREPARES   => false,
    ]);
} catch (PDOException $e) {
    die("PDO Connection failed: " . $e->getMessage());
}