is it safe? insert the data to db by user .. ?
-
hi ..
I’m tring to make the visitor can register from the front end or (the index page )not admin page ..
firstly , I made the template page , it is name : Register User
but I am afraid if the user can do somthing bad (sql injection .. etc) ..
this is my code ..
if(!empty($_POST['user_name']) || !empty($_POST['email'])){ $user_login = $_POST['user_name']; $user_email = $_POST['email']; $random_password = wp_generate_password(5 , true ); wp_create_user( $user_login, $random_password, $user_email ) } else { echo 'The user name or E-mail is empty'; }
also , how can know this is email or not ?
sorry , my language is bad >_<
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘is it safe? insert the data to db by user .. ?’ is closed to new replies.