Guest User

Untitled

a guest
Feb 13th, 2019
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. <?php
  2. include('connection.php');
  3. $username = $_POST['username'];
  4. $email = $_POST['email'];
  5. $password = $_POST['password'];
  6. $confirmpassword = $_POST['confirmpassword'];
  7. echo $username;
  8. echo $email;
  9. echo $password;
  10. echo $confirmpassword;
  11. if(!empty($username) ||!empty($email) ||!empty($password) ||!empty($confirmPassword))
  12. {
  13. echo " hello";
  14. if ($password=$confirmpassword)
  15. { echo "hai";
  16. $sql="insert into signup (username,email,password,rpassword) values ('$username','$email','$password','$confirmpassword');";
  17. echo $sql;
  18.  
  19. if(mysqli_query($conn,$sql))
  20. {
  21. echo "inserted";
  22. header("Location:home.php?register=success");
  23. }
  24. }
  25. }
  26. else
  27. {
  28. echo "all fields are required";
  29. }
  30. ?>
Add Comment
Please, Sign In to add comment