<?php
    include_once ('dbconn.php');

    $sitetitle = "NKN Academy & Training Provider";
    $year = date("Y");
    $copyrights = "Copyright © ".$year." NKN Academy";
    $version = "Version 1.0.0";

    if (session_status() == PHP_SESSION_NONE) {
        session_start();
    }

    $user_check = $_SESSION['login_user'];
    

    if(!isset($_SESSION['login_user'])){
       header("location:index.php");
      die();
    }

    $ses_sql = mysqli_query($conn,"SELECT * from tbluseracc WHERE Username = '$user_check' ");

    $row = mysqli_fetch_array($ses_sql,MYSQLI_ASSOC);

    $login_index = $row['AutoIndex'];
    $login_session = $row['Username'];
    $login_fullname = $row['FullName'];
    $login_usertype = $row['UserType'];

    $formfname = "pdfform.php" ;

    if(!isset($_SESSION['login_user'])){
       header("location:index.php");
      die();
    }
 
?>
