Advertisement
Guest User

Untitled

a guest
May 4th, 2016
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. <?php
  2. require 'connection.php';
  3.  
  4. if (isset($_POST['submit'])) {
  5. $res= $conn->prepare("Insert into user (Name,Email,user_name,password)Values (:name,:email,:user,md5(:pass))");
  6. $res->bindParam(':name', $name);
  7. $res->bindParam(':email', $email);
  8. $res->bindParam(':user', $user);
  9. $res->bindParam(':pass', $pass);
  10.  
  11. $name = $_POST['name'];
  12. $email = $_POST['email'];
  13. $username =$_POST['user'];
  14. $password = $_POST['pass'];
  15.  
  16. $res->execute();
  17.  
  18. if ($res==TRUE) {
  19. echo 'Registered successfully';
  20. } else {
  21. echo 'There was some error.';
  22. }
  23. }
  24. ?>
  25.  
  26. <body>
  27. <form action="Registration.php" method="post" >
  28. Name:<br>
  29. <input type="text" name="name"/><br>
  30. Email:<br>
  31. <input type="text" name="email" /><br>
  32. Username:<br>
  33. <input type="text" name="user" /><br>
  34. Password:<br>
  35. <input type="password" name="pass" /><br>
  36. <input type="submit" name="submit" value="SignUp!"/>
  37. </form>
  38. </body>
  39.  
  40. $user =$_POST['user'];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement