Use a select box to change a php variable

To store the user defined value into the DB you can use the update_user_meta() function. And retrieve back the info with get_user_meta(). You could update the the user meta key with an AJAX call on your select change or put your select in a form and update on form submit either with $_GET or $_POST … Read more

saving variables after redirect

You could store the password as a transient, then pass the transient key in the URL instead so it can be retrieved using that key on the next page. function process_my_form() { if ( ! empty($_POST[‘password’]) ) { $password = ($_POST[‘password’]); } else {return;} /* Store Password via Transient API */ $passkey = wp_generate_password(12, false); … Read more