PHP Welcome System

php

I'm going through the entire process of building a after user login Welcome Dashboard system......


STEP 1:

welcome.php

    <?php
// Initialize the session
session_start();
 
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
    header("location: login.php");
    exit;
}
?>
 
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Welcome</title>
    <title>Login</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.css">
    <link rel="stylesheet" href="layout.css">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<body>
<!-------------------->
<!-----start nav bar---->
<!-------------------->
<div class="topNav">
<h3>DCO</h3>
</div>
<div class="topnav" id="myTopnav">
  <a href="#home"class="active"><i class="fa fa-home"> Home</i></a>
  <a href="javascript.html"><i class="fa fa-coffee"> Java Script</i></a>
  <a href="#news"><i class="fa fa-html5"> Html & css</i></a>
  <a href="#news"><i class="fa fa-product-hunt"> php</i></a>
  <a href="#"><i class="fa fa-video-camera" aria-hidden="true"> Videos</i></a>  
  <a href="aboutme/aboutme.html"><i class="fa fa-user"> About</i></a>
  <a href="javascript:void(0);" class="icon" onclick="myFunction()">
    <i class="fa fa-bars"></i>
  </a>
</div>
<script>
function myFunction() {
  var x = document.getElementById("myTopnav");
  if (x.className === "topnav") {
    x.className += " responsive";
  } else {
    x.className = "topnav";
  }
}
</script>
    <div class="page-header">
        <h1>Hi, <b><?php echo htmlspecialchars($_SESSION["username"]); ?></b>. Welcome to our site.</h1>
    </div>
    <p>
        <a href="reset-password.php" class="btn btn-warning">Reset Your Password</a>
        <a href="logout.php" class="btn btn-danger">Sign Out of Your Account</a>
    </p>



</body>
<style>

.page-header{ color:white; text-align: center;}

</style>
</html>

STEP 2:

layout.css

Css code are same as register page