<!-- Author  Raivis Rampāns
Created 12.03.2025
Editor Raivis
Modified 12.03.2025
Description: The file that connects the whole page with the database -->

<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "notepad";

// Izveido savienojumu ar datubāzi
$conn = new mysqli($servername, $username, $password, $dbname);

// Iestata UTF-8 kodējumu
$conn->set_charset("utf8");

// Pārbauda savienojumu ar datubāzi
if ($conn->connect_error) {
  die("Connection failed: " . $conn->connect_error);
}