Advertisement
Guest User

Untitled

a guest
Sep 16th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.42 KB | None | 0 0
  1. <?php
  2. echo "<h1>Register</h1>";
  3.  
  4. $submit = $_POST['submit'];
  5.  
  6. $email = strip_tags($_POST['email']);
  7. $username = strip_tags($_POST['username']);
  8. $password = md5(strip_tags($_POST['password']));
  9. $repeatpassword = md5(strip_tags($_POST['repeatpassword']));
  10. $date = date("Y-m-d");
  11.  
  12. if ($submit)
  13. {
  14.  
  15. if ($email&&$username&&$password&&$repeatpassword)
  16. {
  17. $password = md5($password);
  18. $repeatpassword = md5($repeatpassword);
  19.  
  20. if ($password==$repeatpassword)
  21. {
  22.  
  23. }
  24. else
  25. echo "Your passwords do not match!";
  26. }
  27. else
  28. {
  29.  
  30. echo "Success";
  31.  
  32. }
  33.  
  34. }
  35.  
  36. ?>
  37.  
  38. <html>
  39. <p>
  40. <form action='register.php' method='POST'>
  41. <table
  42. <tr>
  43. <td>
  44. Your Email
  45. </td>
  46. <td>
  47. <input type='text' name='email'>
  48. </td>
  49. </tr>
  50. <tr>
  51. <td>
  52. Username
  53. </td>
  54. <td>
  55. <input type='text' name='username'>
  56. </td>
  57. </tr>
  58. <tr>
  59. <td>
  60. Password
  61. </td>
  62. <td>
  63. <input type='password' name='password'>
  64. </td>
  65. </tr>
  66. <tr>
  67. <td>
  68. Repeat Password
  69. </td>
  70. <td>
  71. <input type='password' name='repeatpassword'>
  72. </td>
  73. </tr>
  74. </table>
  75. <input type='submit' name'submit' value='Register'>
  76. </form>
  77.  
  78. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement