<?php
    
    # 1. Create a database connection.
    define("DB_SERVER", "weeb03");
    define("DB_USER", "fet15030365");
    define("DB_PASS", "6X6d8m");
    define("DB_NAME", "fet15030365");

    
    # storing table name, used to fetch summaries. */
    define("TB_NAME", "film_list");
    /*
    
     # 1. Local Testing Environment.
    define("DB_SERVER", "localhost");
    define("DB_USER", "csalmeida");
    define("DB_PASS", "foxtrotoscarmike");
    define("DB_NAME", "pigstrip");
    */
    $connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);

    // Test if connection occurred.
    if(mysqli_connect_errno()) {
        # Could redirect to 404.php or other 404 page.
        die("Database connection failed " .
            mysqli_connect_error() .
            " (" . mysqli_connect_errno() . ")"
        );
    }