Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form method="post" action="">
- Username: <input type="text" name="username" value="" /><br/>
- Email:<input type="text" name="email" value=""/><br/>
- Password: <input type="password" name="pass" value="" /><br/>
- Repeat Password: <input type="password" name="pass2" value=""/><br/>
- <input type="submit" name="submit" value="Submit" />
- </form>
- <?php
- $conn = mysql_connect("localhost", "root", "92309ilym");
- $db = mysql_select_db("conquerserver");
- $encryptedPw = md5('".$pass."');
- if(isset($_POST['submit']))
- {
- if(isset($_POST['pass']) && $_POST['pass'] != "")
- {
- if($_POST['pass'] == $_POST['pass2'])
- {
- if(strlen($_POST['pass']) > 2 && strlen($_POST['pass']) < 32)
- {
- $sql = "INSERT INTO `Accounts` (Username, Password, Email) VALUES ('".$_POST['username']."', '".$_POST['encryptedPw']."', '".$_POST['email']."')";
- $sql = mysql_query($sql);
- echo "Registered Successfully";
- } else {
- die("Your password must be between 3 and 32 characters.");
- }
- } else {
- die("Your passwords do not match.");
- }
- } else {
- die("Please enter in a password.");
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement