<?php
// db.php

$servername = "localhost";   // Your database server
$username = "root";          // Your database username
$password = "";              // Your database password
$dbname = "amul_registration_db"; // Your database name

// Create a MySQLi connection
$con = new mysqli($servername, $username, $password, $dbname);

// Check connection
if ($con->connect_error) {
    die("Database connection failed: " . $con->connect_error);
}

// Set character set to UTF-8
$con->set_charset("utf8");

// Optional: display success message (remove in production)
# echo "Connected successfully";
?>
