Advertisement
Jabo2531

signup.php

Sep 18th, 2020
1,772
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.63 KB | None | 0 0
  1. <?php
  2.     require "header.php";
  3. ?>
  4.  
  5.         <main>
  6.             <div class="wrapper-main">
  7.                 <section class="section-default">
  8.                     <h1>Signup</h1>
  9.                     <?php
  10.                     if (isset($_GET['error'])) {
  11.                         if ($_GET['error'] == "emptyfields") {
  12.                             echo '<p class="signuperror">Fill in all fields!</p>';
  13.                         }
  14.                         else if ($_GET['error'] == "invaliduidmail") {
  15.                             echo '<p class="signuperror">Invalid username and e-mail</p>';
  16.                         }
  17.                         else if ($_GET['error'] == "invaliduid") {
  18.                             echo '<p class="signuperror">Invalid username</p>';
  19.                         }
  20.                         else if ($_GET['error'] == "invalidmail") {
  21.                             echo '<p class="signuperror">Invalid e-mail</p>';
  22.                         }
  23.                         else if ($_GET['error'] == "passwordcheck") {
  24.                             echo '<p class="signuperror">Your Passwords do not Match</p>';
  25.                         }
  26.                         else if ($_GET['error'] == "usertaken") {
  27.                             echo '<p class="signuperror">Username is already taken</p>';
  28.                         }
  29.                     }
  30.                     else if ($_GET['signup'] == "success") {
  31.                         echo '<p class="signupsuccess">Signup successful</p>';
  32.                     }
  33.                     ?>
  34.                     <form class="form-signup" action="model/signup.mod.php" method="post">
  35.                     <form action="model/signup.mod.php" method="post">
  36.                         <input type="text" name="uid" placeholder="Username">
  37.                         <input type="text" name="mail" placeholder="Mail">
  38.                         <input type="password" name="pwd" placeholder="Password">
  39.                         <input type="password" name="pwd-repeat" placeholder="Repeat Password">
  40.                         <button type="submit" name="signup-submit">Signup</button>
  41.                     </form>
  42.                     <?php
  43.                     if (isset($_GET["newpwd"])) {
  44.                         if ($_GET["newpwd"] == "passwordupdated") {
  45.                             echo '<p class="signupsuccess">Your Password has been reset!</p>';
  46.                         }
  47.                     }
  48.                     ?>
  49.                     <a class="p-forgetpwd" href="reset-password.php">Forgot Your Password?</a>
  50.  
  51.                 </section>
  52.             </div>
  53.         </main>
  54.  
  55. <?php
  56.     require "footer.php";
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement