Advertisement
Guest User

Untitled

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