Guest User

Untitled

a guest
Sep 8th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. is it safe? insert the data to db by user ..?
  2. if(!empty($_POST['user_name']) || !empty($_POST['email'])){
  3. $user_login = $_POST['user_name'];
  4. $user_email = $_POST['email'];
  5. $random_password = wp_generate_password(5 , true );
  6. wp_create_user( $user_login, $random_password, $user_email )
  7.  
  8. } else {
  9. echo 'The user name or E-mail is empty';
  10.  
  11. }
  12.  
  13. <?php if ( is_email( 'email@domain.com' ) ) {
  14. echo 'email address is valid.';
  15. } ?>
  16.  
  17. <?php
  18. $username = $_POST['username'];
  19. if ( username_exists( $username ) )
  20. echo "Username In Use!";
  21. else
  22. echo "Username Not In Use!";
  23. ?>
Add Comment
Please, Sign In to add comment