Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php session_start();
- $_SESSION['DOCUMENT_ROOT'] = 'login_system/';
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <link href="css/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
- <link rel="stylesheet" type="text/css" href="css/stylesheet.css">
- <script scr="scripts/main.js"></script>
- <title>Login page</title>
- </head>
- <body>
- <div class="header">
- <div class="nav">
- <ul>
- <li><a href="index.php">Home</a></li>
- <?php
- if (isset($_SESSION['id']))
- echo "<form action='includes/logout.php'>
- <button>Log out</button>
- </form>";
- else
- echo "<form action='includes/login.php' method='POST'>
- <input type='text' name='username' placeholder='username'>
- <input type='password' name='password' placeholder='Password'>
- <button class='button-submit' type='submit'>Login</button>
- </form>";
- ?>
- <li><a href="../views/signup/default.php">Sign up</a></li>
- </ul>
- </div>
- </div>
- <?php require '../../includes/header.php'; ?>
- <div class"container">
- <?php
- if (isset($_SESSION['id']))
- echo 'You are already logged in!';
- else
- echo "<form action='../../includes/signup.php' method='POST'>
- <label for='firstname'>First name:</label>
- <input type='text' name='firstname' placeholder='First name'><br>
- <label for='lastname'>Last name:</label>
- <input type='text' name='lastname' placeholder='Last name'><br>
- <label for='username'>Username:</label>
- <input type='text' name='username' placeholder='username'><br>
- <label for='lastname'>Desired Password:</label>
- <input type='password' name='password' placeholder='Password'><br>
- <button type='submit'>Sign up</button>
- </form>";
- ?>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement