title: Update user meta on custom wordpress form and redirect
body: <p>I have a fully functioning custom wordpress form that updates the user meta when they are logged in, however when I submit it just reloads the same page I am on, I am trying to get it to redirect to a thank you page.  How would I go about this?  Current working code I am using below.  Thanks.</p>
  
  <pre><code>    &lt;?php  
          global $current_user;
          get_currentuserinfo();
      if($_POST['gender'] != '') {
      $gender_update = $_POST['gender'];
      update_user_meta($current_user-&gt;ID,'gender', $gender_update);
      }
          ?&gt;
  
  &lt;?php
  function curURL() {
  $pageURL = 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
  return $pageURL;
  }
  ?&gt;
  
  &lt;form name="userform" method="post" id="adduser" class="user-forms" action="&lt;?php echo curURL(); ?&gt;"  &gt;
  </code></pre>