-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
35 lines (35 loc) · 879 Bytes
/
header.php
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
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Login System</title>
<link rel="stylesheet" href="style.css">
</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="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="username" placeholder="Username/E-mail">
<input type="password" name="pwd" placeholder="Password">
<button type="submit" name="submit">Login</button>
</form>
<a href="signup.php">Sign Up</a>';
}
?>
</div>
</div>
</nav>
</header>