SHARE
TWEET

Untitled

a guest Jun 14th, 2017 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <form method="post" action="">
  2.  
  3. Username: <input type="text" name="username" value="" /><br/>
  4. Email:<input type="text" name="email" value=""/><br/>
  5. Password: <input type="password" name="pass" value="" /><br/>
  6. Repeat Password: <input type="password" name="pass2" value=""/><br/>
  7.  
  8. <input type="submit" name="submit" value="Submit" />
  9.  
  10. </form>
  11.  
  12. <?php
  13. $conn = mysql_connect("localhost", "root", "92309ilym");
  14. $db = mysql_select_db("conquerserver");
  15. $encryptedPw = md5('".$pass."');
  16.  
  17.  
  18. if(isset($_POST['submit']))
  19. {
  20.      if(isset($_POST['pass']) && $_POST['pass'] != "")
  21.      {
  22.           if($_POST['pass'] == $_POST['pass2'])
  23.           {
  24.                if(strlen($_POST['pass']) > 2 && strlen($_POST['pass']) < 32)
  25.                {
  26.                     $sql = "INSERT INTO `Accounts` (Username, Password, Email) VALUES ('".$_POST['username']."', '".$_POST['encryptedPw']."', '".$_POST['email']."')";
  27.                     $sql = mysql_query($sql);
  28.                     echo "Registered Successfully";
  29.                } else {
  30.                     die("Your password must be between 3 and 32 characters.");
  31.                }
  32.           } else {
  33.                die("Your passwords do not match.");
  34.           }
  35.      } else {
  36.           die("Please enter in a password.");
  37.      }
  38. }
  39. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top