Skip to content
Snippets Groups Projects
Commit 95924b8c authored by Sibidharan's avatar Sibidharan :speech_balloon:
Browse files

WIP Home

parent dff76704
No related branches found
No related tags found
No related merge requests found
<?php
include_once 'library/autoload.php';
include_once 'library/auth.php';
if(isset($_POST['type'])){
if($_POST['type'] == 'login'){
......
<?php
include_once 'library/autoload.php';
die('dead');
include_once 'library/auth.php';
require 'library/user.php';
if(isset($_COOKIE['username']) and isset($_COOKIE['token'])){
if(!verify_session($_COOKIE['username'], $_COOKIE['token'])){
header("Location: index.php");
......@@ -66,7 +67,7 @@ if(isset($_COOKIE['username']) and isset($_COOKIE['token'])){
</a>
<ul class="nav justify-content-end">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="#">Welcome, <?=get_fullname()?></a>
<a class="nav-link disabled" aria-current="page" href="#">Welcome, <?=get_fullname()?></a>
</li>
<li class="nav-item">
<a class="nav-link" href="logout.php">Logout</a>
......
<?php
include_once 'auth.php';
include_once 'user.php';
\ No newline at end of file
......@@ -7,7 +7,7 @@ function get_fullname(){
$connection = get_db_connection();
$result = mysqli_query($connection, $query);
if(mysqli_num_rows($result) == 1){
$row = mysqli_fetch_assoc($connection, $query);
$row = mysqli_fetch_assoc($result);
return $row['full_name'];
} else {
return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment