Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1.  
  2. <?php
  3. session_start();
  4. ?>
  5.  
  6. <!DOCTYPE html>
  7. <html lang="en">
  8. <head>
  9. <meta charset="UTF-8">
  10. <title>login system</title>
  11. <link rel="stylesheet" type="text/css" href="style.css">
  12. </head>
  13. <body>
  14.  
  15. <header id="header" class="">
  16. <nav>
  17. <div class="main-wrapper">
  18. <ul>
  19. <li><a href="index.php" title="">Home</a></li>
  20. </ul>
  21. <div class="nav-login">
  22. <?php
  23. if (isset($_SESSION['u_id'])) {
  24. echo '<form action="includes/logout.inc.php" method="POST">
  25. <button type="submit" name = "submit">Logout</button>
  26. </form>';
  27. } else {
  28. echo '<form action="includes/login.inc.php" method="POST">
  29. <input type="text" name="uid" placeholder="Username/e-mail">
  30. <input type="password" name="pwd" placeholder="password">
  31. <button type="submit" name="submit">Login</button>
  32. </form>
  33. <button type="submit name=""> <a href="signup.php">Sign up</a> '
  34. ;
  35. }
  36. ?>
  37. </div>
  38. </div>
  39. </nav>
  40. </header><!-- /header -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement