Advertisement
Guest User

Untitled

a guest
May 2nd, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. <?php
  2. require 'connection.php';
  3. if (isset($_POST['submit'])) {
  4. $res= $conn->prepare("Insert into user (Name,Email,user_name,password)Values (:name,:email,:user,md5(:pass))");
  5. $res->bindParam(':name', $name);
  6. $res->bindParam(':email', $email);
  7. $res->bindParam(':user', $user);
  8. $res->bindParam(':pass', $pass);
  9.  
  10. $name = $_POST['name'];
  11. $email = $_POST['email'];
  12. $username =$_POST['user'];
  13. $password = $_POST['pass'];
  14.  
  15. $res->execute();
  16. if ($res==TRUE) {
  17. echo 'Registered successfully';
  18. } else {
  19. echo 'There was some error.';
  20. }
  21.  
  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.  
  37. <input type="submit" name="submit" value="SignUp!"/>
  38. </form>
  39.  
  40. </body>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement