Form doesn't seem to read $_POST
-
Hello!
I’ve downloaded your plugin – it’s very nice π I’ve almost achieved what I wanted with your plugin. But one problem… πHere’s the deal. I have following code:
<input type="submit" name="submit" value="company"> <input type="submit" name="submit" value="multi_company"> <?php } add_action('zm_ajax_login_register_below_email_field', 'account_type_registration_field'); function setCompanyRole($company_id) { if($_POST['submit'] == 'company') {$user_type='company';} if($_POST['submit'] == 'multi_company') {$user_type='multi_company';} if(!current_user_can('manage_options')) { $company = get_user_by('id', $company_id); $ce = CompanyEmployee::getInstance(); if($user_type=='company') { $ce->markUserAsCompany($company); } elseif($user_type=='multi_company') { $ce->markUserAsMultiCompany($company); } } } add_action("user_register", "setCompanyRole");Which, when I call it as (add_action(register_form)) in my wp-login works just fine – It marks user as proper company.
When I try to do that inside your register form, it doesn’t work. Why?
I’ve added to the <form> attribute method=”post”
could you please help?
ah, account_type_registration_field is a function which starts earlier.
https://wordpress.org/plugins/zm-ajax-login-register/
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Form doesn't seem to read $_POST’ is closed to new replies.