Advertisement
Guest User

Untitled

a guest
Aug 5th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <?php
  2.  
  3. require('dbc.php');
  4.  
  5. // set variables
  6.  
  7. $full_name = $_POST['full_name'];
  8. $username = $_POST['username'];
  9. $password = $_POST['password'];
  10. $repeat_password = $_POST['repeat_password'];
  11.  
  12. //check if all is filled in
  13.  
  14. if( empty($full_name) || $full_name == NULL ) {
  15.  
  16. echo "Please fill in your Full name, or just figure out a fake one";
  17.  
  18. }
  19.  
  20. if( empty($username) || $username = NULL ) {
  21.  
  22. echo "Please fill in an username";
  23.  
  24. }
  25.  
  26. if ( empty($password) || empty($repeat_password) || $password == NULL || $repeat_password == NULL ) {
  27.  
  28. echo "Please fill in an password, also repeat the password.";
  29.  
  30. }
  31. elseif ( strlen($password || $repeat_password) < 6 )) {
  32.  
  33. echo "Make your password longer then 6 characters";
  34.  
  35. }
  36. elseif ($password !== $repeat_password){
  37.  
  38. echo "Please fill in the same passwords";
  39.  
  40. }
  41.  
  42. function safePassword{
  43.  
  44. $hash_repeat_password = hash('sha512,$repeat_password');
  45. $md5_password = md5($hash_repeat_password);
  46.  
  47. $hash_password = hash('sha512,$password');
  48. $md5_password = md5($hash_password);
  49.  
  50. }
  51.  
  52. $query_insert_username = mysql_query('INSERT INTO username WHERE')
  53.  
  54. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement