How do I capture the selected option and pass in sending the registration form?

Way use jQery to populate the select field when you can use filter and hook into the form using PHP eg: //1. Add a new form element… add_action(‘register_form’,’_register_form_wpa103118′); function _register_form_wpa103118 (){ $name_of_select = ( isset( $_POST[‘name_of_select’] ) ) ? $_POST[‘name_of_select’]: ”; $options = array( ‘Medicine’ => ‘Medicine’, ‘Option2’ => ‘Option2’, ); ?> <p> <label for=”name_of_select”><?php … Read more

Assigning input to variable

Your form doesn’t contain the fields you think it does. Use FireBug or a similar tool (even var_dump($_POST)) to see what is actually being posted. Your num_users is a setting group, not a single field. At best the field with the value will be user_main_settings field. The previous commenter is also correct – checking for … Read more

Username from e-mail

As far as i know there is no hook or filter to provide a custom User name for default registration process, however if you really want to modify it, you can alter the $_POST data. here is the sample code: add_action(‘wp_loaded’, ‘wpse_138736_filter_username’); function wpse_138736_filter_username(){ //your code to extract username from email $_POST[‘user_login’] = ‘test’; } … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)