Advertisement
Guest User

Untitled

a guest
Apr 9th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. <?php
  2. include('classes/DB.php');
  3.  
  4. if (isset($_POST['createaccount'])) {
  5. $username = $_POST['username'];
  6. $password = $_POST['password'];
  7. $email = $_POST['email'];
  8.  
  9. DB::query('INSERT INTO users VALUES (\'\', :username, :password, :email)', array(':username'=>$username, ':password'=>$password, ':email'=>$email));
  10. echo "Success";
  11. }
  12. ?>
  13.  
  14. <h1>Register</h1>
  15. <form class="create-account.php" method="post">
  16. <input type="text" name="username" value="" placeholder="Username"><p />
  17. <input type="password" name="password" value="" placeholder="Password"><p />
  18. <input type="email" name="email" value="" placeholder="Email"><p />
  19. <input type="submit" name="createaccount" value="Create Account">
  20. </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement