signup.php 833 B

123456789101112131415161718192021222324252627
  1. <?php
  2. session_start();
  3. ?>
  4. <!DOCTYPE html>
  5. <html>
  6. <head>
  7. <meta charset="utf-8">
  8. <title>Signup</title>
  9. </head>
  10. <body>
  11. <h1>Signup</h1>
  12. <form action="adduser.php" method="post">
  13. <label for="login">Login</label> <input type="text" id="login" name="login" required autofocus>
  14. <label for="password">Password</label> <input type="password" id="password" name="password" required>
  15. <label for="confirm">Confirm password</label> <input type="password" id="confirm" name="confirm" required>
  16. <input type="submit" value="Signup">
  17. </form>
  18. <p>
  19. If you already have an account, <a href="signin.php">signin</a>.
  20. </p>
  21. <?php if ( isset($_SESSION['message']) && !empty($_SESSION['message']) ) { ?>
  22. <section>
  23. <p><?= $_SESSION['message']; ?></p>
  24. </section>
  25. <?php } ?>
  26. </body>
  27. </html>