<?php
if (session_status() === PHP_SESSION_NONE) { session_start(); }
$servername = "localhost";
$username   = "nextpay_topup";
$password   = "nextpay_topup";
$dbname     = "nextpay_topup";
try {
    $conn = new mysqli($servername, $username, $password, $dbname);
    if ($conn->connect_error) { throw new Exception("Connection failed: " . $conn->connect_error); }
    $conn->set_charset("utf8mb4");
} catch (Exception $e) { die("ডাটাবেজ কানেকশন সমস্যা: " . $e->getMessage()); }
?>