Advertisement
Guest User

Untitled

a guest
Mar 6th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. <?php
  2.  
  3. session_start();
  4.  
  5. $servername = "localhost";
  6. $username = "root";
  7. $password = "";
  8. $database = "twatter";
  9.  
  10.  
  11. $connection = new mysqli($servername, $username, $password);
  12. $database = mysqli_select_db($connection, "twatter");
  13.  
  14. echo $_POST['user'];
  15. echo $_POST['pass'];
  16.  
  17. if (isset($_POST["register"])){
  18. if($_POST["user"] && $_POST["pass"]){
  19. $username = $_POST["user"];
  20. $password = $_POST["pass"];
  21. }
  22.  
  23. mysqli_query($connection, "INSERT INTO 'members' ('Username', 'Password') VALUES ('$username', '$password')");
  24. echo "<p style='text-align:center'>Your account has been created and you've been successfully logged in.";
  25. }
  26.  
  27. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement