-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.php
More file actions
50 lines (46 loc) · 1.16 KB
/
header.php
File metadata and controls
50 lines (46 loc) · 1.16 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
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Welcome to My Store</title>
<!-- <link rel="stylesheet" type="text/css" href="style.css"> -->
<link rel="stylesheet" type="text/css" href="layout2.css">
</head>
<body class="body">
<header class="header">
<div class="continerH">
<div class="logo">
<h1>This is my store website</h1>
</div>
<div class="loginF">
<ul>
<li><a><?php
if (isset($_SESSION['username'])){
echo "Welcome ".$_SESSION['username'];
}
?></a></li></ul>
<?php
if (isset($_SESSION['username'])){
echo"<form action='inc/logout.inc.php'>
<button>LOGOUT</button>
</form>";
} else {
echo "<form action='inc/login.inc.php' method='POST'>
<input type='text' name='user' placeholder='Username'>
<input type='password' name='pwd' placeholder='Passowrd'>
<button type='submit'>LOGIN</button>
</form>";
}
?></div>
</div>
</header>
<nav class="nav">
<ul>
<li><a href="index.php">HOME</a></li>
<li><a href="signup.php">SIGN UP</a></li>
<li><a href="product.php">Products</a></li>
</ul>
</nav>