-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnav.php
More file actions
26 lines (25 loc) · 729 Bytes
/
nav.php
File metadata and controls
26 lines (25 loc) · 729 Bytes
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
<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>
<li><a><?php
if (isset($_SESSION['username'])){
echo "Welocome ".$_SESSION['username'];
}
?></a></li>
<?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>";
}
?>
</ul>
</nav>