title: Option input is not updating to WordPress database, when I update the input it just copy's the value of another input
body: <p>Here are a few functions that I am using:</p>
  
  <pre><code>function dp_find_results($table_name) {
     global $wpdb;
  
      $result = $wpdb-&gt;get_results ( "
          SELECT * 
          FROM  $table_name
          WHERE role = 'member' OR role = 'admin'
      " );
  
      echo '&lt;table&gt;&lt;form action="" method="POST"&gt;';
      foreach ( $result as $page )
      {
          if($page-&gt;role === 'member') {
              $value1 = 'admin';
              $value2 = 'Super Admin';
          } elseif($page-&gt;role ==='admin') {
              $value1 = 'member';
              $value2 = 'Super Admin';
          } else {
              $value1 = 'member';
              $value2 = 'admin';
          }
  
          echo
              '&lt;tr&gt;
                  &lt;th&gt;Role&lt;/th&gt;
                  &lt;th&gt;Username&lt;/th&gt;
                  &lt;th&gt;Update&lt;/th&gt;
              &lt;/tr&gt;';
  
          echo '&lt;tr&gt;';
              echo '&lt;td&gt;
                  &lt;select name="role"&gt;
                    &lt;option value="' . $page-&gt;role . '"&gt;' . $page-&gt;role . '&lt;/option&gt;
                    &lt;option value="' . $value1 . '"&gt;' . $value1 . '&lt;/option&gt;
                    &lt;option value="' . $value2 . '"&gt;' . $value2 . '&lt;/option&gt;
                  &lt;/select&gt;
                  &lt;/td&gt;';
              echo '&lt;td&gt;' . $page-&gt;username .'&lt;/td&gt;';
              echo '&lt;td&gt;&lt;button class="danzerpress-button-modern" type="submit" name="role-update-' . $page-&gt;username . '" value="' . $page-&gt;username . '"&gt;Update&lt;/button&gt;&lt;/td&gt;';
          echo '&lt;/tr&gt;';
      }
      echo '&lt;/form&gt;&lt;/table&gt;';
  
  }
  
  function get_registered_users() {
      global $wpdb;
      $table_name = 'dp_user_roles';
  
      $result = $wpdb-&gt;get_results ( "
          SELECT * 
          FROM  $table_name
      " );
  
      $users = array();
          foreach ($result as $arrayResult) {
              array_push($users, 'role-update-' . $arrayResult-&gt;username);
  
          }
      //returns role-update-$username
      return $users;
  
  }
  
  //checking for each registered user to match the button being posted
  $variables = get_registered_users();
  
  foreach($variables as $variable_name){
  
      if(isset($_POST[$variable_name])){
  
          $role = $_POST['role'];
          $username = $_POST[$variable_name];
  
          echo $role . '&lt;br&gt;' . $username . '&lt;br&gt;';
          //after confirming submission is correct, update table
          dp_change_user_role($role, $username);
  
      }
  
  }
  function dp_change_user_role($role, $username) {
          $table_name = 'dp_user_roles';
          global $wpdb;
          $wpdb-&gt;update( $table_name, 
              array( 
                  'role' =&gt; $role
              ),
                  array(
                      'username' =&gt; $username )   
          );
      }
  </code></pre>
  
  <p>Here it is in action
  <a href="https://gyazo.com/62c0bdaca6a4c1443d011b8830d41130" rel="nofollow noreferrer">https://gyazo.com/62c0bdaca6a4c1443d011b8830d41130</a>, the weird thing I am experiencing is that the bottom table row updates but the first table row will only change to the value the bottom table row is. I've tried a few things for trouble shooting but can't get my head around why it's not working. If I remove one of them then the changes work fine with no issues.</p>
  
  <p>Here is another gif of the problem, here is what happens if I update the bottom one and then update the top one: <a href="https://gyazo.com/85956608dabe973ea8907b19daeb0094" rel="nofollow noreferrer">https://gyazo.com/85956608dabe973ea8907b19daeb0094</a> very weird interaction and I can't figure out why it's doing it. This is the main issue unless you find others :).</p>