title: How to send multiple radio button values in tab form
body: <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;div class="tab"&gt;&lt;h4&gt;Zip Code&lt;/h4&gt;
      &lt;p&gt;&lt;input type="text" class="text1" placeholder="Enter zip code..." oninput="this.className = ''" name="zipcode"&gt;&lt;/p&gt;
    &lt;/div&gt;
    &lt;div class="tab"&gt;&lt;h4&gt;Question1&lt;/h4&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb" value="1-3 months"  class="option-input radio" checked/&gt; 1-3 months&lt;/p&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb" value="4-6 months" class="option-input radio"&gt; 4-6 months&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div class="tab"&gt;&lt;h4&gt;Question2&lt;/h4&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb1" value="Single" class="option-input radio"  checked/&gt; Single&lt;/p&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb1" value="Condo" class="option-input radio"&gt; condo&lt;/p&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb1" value="Mobile" class="option-input radio"&gt;Mobile&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;div class="tab"&gt;&lt;h4&gt;Question3&lt;/h4&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb2" value="Moving" class="option-input radio" checked/&gt; Moving&lt;/p&gt;
      &lt;p&gt;&lt;input type="radio" name="rdb2" value="100" class="option-input radio"&gt; 100&lt;/p&gt;
    &lt;/div&gt;
  
    &lt;button type="button" id="prevBtn" onclick="nextPrev(-1)"&gt;Previous&lt;/button&gt;
    &lt;button type="button" id="nextBtn" onclick="nextPrev(1)"&gt;Next&lt;/button&gt;
  </code></pre>
  
  <p><strong>JS</strong> </p>
  
  <pre><code>function validateForm() {
    // This function deals with validation of the form fields
    var x, y, i, valid = true;
    x = document.getElementsByClassName("tab");
    y = x[currentTab].getElementsByTagName("input");
    var rdb = document.getElementsByName('rdb').value;
    var rdb1 = document.getElementsByName('rdb1').value;
    var rdb2 = document.getElementsByName('rdb2').value;
  
    for (i = 0; i &lt; y.length; i++) {
      if (y[i].value == "") {
        y[i].className += " invalid";
        valid = false;
      }
    }
    if (valid) {
      document.getElementsByClassName("step")[currentTab].className += " finish";
    }
    return valid; // return the valid status
  }
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>$EmailFrom = "test@gmail.com";
  $EmailTo = "xyz@gmail.com";
  $Subject = "Test";
  
  $zipcode = $_POST['zipcode'];
  $rdb_value = trim(stripslashes($_POST['rdb']));
  $rdb_value1 = trim(stripslashes($_POST['rdb1']));
  $rdb_value2 = trim(stripslashes($_POST['rdb2']));
  
  $Body .= $zipcode;
  $Body .= "Question1: ";
  $Body .= $rdb_value;
  $Body .= "Question2: ";
  $Body .= $rdb_value1;
  $Body .= "Question3: ";
  $Body .= $rdb_value2;
  </code></pre>
  
  <p>Query is below:
  I use multiple tab form in HTML and use javascript and PHP to send all values to an email. please review the code above.</p>
  
  <p>I received this email:</p>
  
  <p>Zipcode:
  Question1:
  Question2:
  Question3:</p>
  
  <p>Section one is HTML Code, Section two is Javascript and section three is Php code here! </p>