<?php
include_once 'header.php'; //includes header file / ievieto galvenes failu 
?>
<h1>Login</h1>

<?php
if (isset($_GET["error"])) {
    if ($_GET["error"] == "emptyInput") { //just tells the user that the input is invalid / pasaka lietotāja ka ievadītie dati nav pareizi vai vispaŗ nav ievadīti 
        echo "<p>Not all fields are filled!</p>";
    } else if ($_GET["error"] == "wrongLogin") {
        echo "<p>Incorrect username or password!</p>";
    }
}
?>
    <form  action=" includes/login.inc.php" method="post" >
        <ul class="list-group-singup">
            <li class="list-group-item border-0"><input type="text" name="uid" placeholder="Username/Email..."></li>
            <li class="list-group-item border-0"><input type="password" name="pwd" placeholder="Password..."></li>
            <li class="list-group-item border-0"><button type="submit" class="btn btn-success" name="submit">Login</button></li>
        </ul>
    </form>


<?php
include_once 'footer.php'; //includes footer file / ievieto kājenes failu
?>
