Advertisement
Guest User

Untitled

a guest
Aug 15th, 2018
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.46 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <head>
  3.     <title>Registration/Login</title>
  4. </head>
  5.         <body>
  6.         <center>
  7.             <div>
  8.                 <form  method="post">
  9.  
  10.                     Registration<br><br>
  11.  
  12.                     Username: <input type="text" id="username" name="username" value="<?php
  13.                     if (isset($_POST["username"])) {
  14.                         echo $_POST["username"];
  15.                     }
  16.                     ?>" required><br><br>
  17.  
  18.                     Password: <input type="password" id="password" name="password" value="<?php
  19.                     if (isset($_POST["password"])) {
  20.                         echo $_POST["password"];
  21.                     }
  22.                         ?>" required><br><br>
  23.                     Repeat password: <input type="password" id="reppassword" name="reppassword" required/><br><br>
  24.  
  25.                     E-mail: <input type="text" id="usermail" name="usermail"value="<?php
  26.                     if(isset($_POST["usermail"])){
  27.                         echo $_POST['usermail'];
  28.                     }
  29.                     ?>" required/>
  30.                     <br><br>
  31.                     <?php
  32.                     if(isset($_POST["password"]) and isset($_POST["reppassword"])) {
  33.                         if (trim($_POST["password"]) == "" or trim($_POST["reppassword"]) == "") {
  34.                             echo("All fields are required");
  35.                         }
  36.                         else if (($_POST["password"]) != ($_POST["reppassword"])) {
  37.                             echo("Passwords do not match");
  38.                         }
  39.                     }
  40.                     ?>
  41.                     <?php
  42.  
  43.                     // email check
  44.  
  45.                     ?>
  46.                     <br><br>
  47.                     <input type="submit" name="register" value="Submit"/><br><br>
  48.                 </form>
  49.                 <form methos="post">
  50.  
  51.                     Login<br><br>
  52.  
  53.                     Username: <input type="text" id="logusername" name="logusername"/><br><br>
  54.  
  55.                     Password: <input type="password" id="logpassword" name="logpassword"/><br><br>
  56.                     <input type="submit" name="login" value="Submit"/><br><br>
  57.  
  58.                 </form>
  59.             </div>
  60.             <div>
  61.                 <a href="Home.php">
  62.                     <input type="button" name="back" value="Back"/>
  63.                 </a>
  64.             </div>
  65.                 </center>
  66.         </body>
  67. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement