<?php
// Configuration for the new app database where user data will be transferred
// Update these values with the new app's database credentials

define('NEW_APP_DB_HOST', 'localhost');
define('NEW_APP_DB_USER', 'snaplimit_quiz3');
define('NEW_APP_DB_PASS', 'snaplimit_quiz3');
define('NEW_APP_DB_NAME', 'snaplimit_quiz3');

/**
 * Get database connection for the new app
 * @return mysqli Database connection object
 */
function getNewAppDbConnection() {
    $conn = new mysqli(NEW_APP_DB_HOST, NEW_APP_DB_USER, NEW_APP_DB_PASS, NEW_APP_DB_NAME);
    
    if ($conn->connect_error) {
        throw new Exception('New app database connection failed: ' . $conn->connect_error);
    }
    
    // Ensure proper emoji support
    $conn->set_charset("utf8mb4");
    
    return $conn;
}
?>

