-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
55 lines (45 loc) · 1.18 KB
/
header.php
File metadata and controls
55 lines (45 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="author" content="">
<link rel="stylesheet" href="style.css">
<!--script src="js/scripts.js"></script-->
<style>
</style>
<script type="text/javascript">
</script>
</head>
<body>
<header>
<nav>
<div class="main-wrapper">
<ul>
<li>
<a href="index.php">Home</a>
</li>
</ul>
<div class="nav-login">
<?php
if(isset($_SESSION['u_id'])) {
echo '<form action="includes/logout.inc.php" method="POST">
<button type="submit" name="submit">Logout</button>
</form>';
} else {
echo '<form action="includes/login.inc.php" method="POST">
<input type="text" name="uid" placeholder="Username/e-mail">
<input type="password" name="pwd" placeholder="password">
<button type="submit" name="submit" id="login">Login</button>
</form>
<a href="signup.php">Sign up</a>';
}
?>
</div>
</div>
</nav>
</header>