<?php

session_start();
require_once "../Config/session_check.php";
// Check if the user is logged in, if not then redirect him to login page


$_SESSION["last_Active"] = time();

$ID = "";

if (isset($_GET["ID"])) {
    $ID = $_GET["ID"];

} else {
    header("location: ../index.php");
}


?>
<!DOCTYPE html>
<html lang="en">
<head>
    <?php include "../Templates/Header.php"; ?>
    <title>Dashboard</title>
</head>
<body>

<div id="page-container">

    <div id="content-wrap">
        <?php include "../Templates/navBar.php"; ?>
        <div class="container-fluid">
            <div class="row">
                <?php include "../Templates/SideBar.php"; ?>

                <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4">
                    <form action="ChangeAddressExecute.php?ID=<?php echo $ID ?>" method="post">
                        <div class="form-group">
                            <label for="HouseNo">House Number:</label>
                            <input type="text"
                                   class="form-control"
                                   name="HouseNo" id="HouseNo" placeholder="HouseNo.">
                        </div>
                        <div class="form-group">
                            <label for="StreetN">Street name:</label>
                            <input type="text"
                                   class="form-control"
                                   name="StreetN" id="StreetN" placeholder="Street Name">
                        </div>
                        <div class="form-group">
                            <label for="City">City</label>
                            <input type="text"
                                   class="form-control"
                                   name="City" id="City" placeholder="City">
                        </div>

                        <div class="form-group">
                            <label for="Postcode">Postcode</label>
                            <input type="text"
                                   class="form-control"
                                   name="Postcode" id="Postcode" placeholder="Postcode">
                        </div>


                        <div class="form-group">
                            <input type="submit" class="btn btn-danger btn-block" value="Update">
                        </div>
                    </form>


                </main>
            </div>
        </div>


    </div>
    <?php include "../Templates/Footer.php"; ?>

</div>

</body>
</html>
