Jquery POST label/value pair
<p>I am now using jquery .submit action (form) to POST the data. A normal POST operation in JAVA does not pass label/value key. For the following (sample) form how I do that ?. I do not want to use Ajax as my form would have upload file fields too and I know how to handle that only in simple POST operation.  </p>

<pre><code>&lt;body&gt;
     &lt;form id="frmRequest" name="frmRequest" &gt;

                &lt;div class="clearfix" id="idRequestDetails"  &gt;
                    &lt;table width="809" border="0" id="tbl_data_1_1_1_1__" summary="Profile"&gt;
                      &lt;tr&gt;
                        &lt;th width="156" scope="col"&gt;&lt;label class="labelrequest" for="txtProfileName1__"&gt;Name&lt;/label&gt;
                        &lt;/th&gt;
                        &lt;th width="74" scope="col"&gt;&lt;label class="labelrequest" for="txtProfileUserID1__"&gt;User ID&lt;/label&gt;&lt;/th&gt;
                        &lt;th width="131" scope="col"&gt;&lt;label class="labelrequest" for="txtSiteCost1__"&gt;Site Cost Centre&lt;/label&gt;&lt;/th&gt;
                         &lt;th width="182" scope="col"&gt;&lt;label class="labelrequest" for="txtDetail1__"&gt;Additional Details&lt;/label&gt;&lt;/th&gt;
                      &lt;/tr&gt;
                      &lt;tr&gt;
                        &lt;td&gt;&lt;input type="text" name="txtProfileName1__" id="txtProfileName1__" tabindex="100" /&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;input name="txtProfileUserID1__" type="text" class="clearfix" id="txtProfileUserID1__" tabindex="110" size="8" /&gt;&lt;/td&gt;
                        &lt;td&gt;&lt;input name="txtSiteCost1__" type="text" id="txtSiteCost1__" tabindex="220" size="8" /&gt;&lt;/td&gt;

                        &lt;td&gt;&lt;textarea name="txtDetail1__" rows="1" id="txtDetail1__" tabindex="240"&gt;&lt;/textarea&gt;&lt;/td&gt;
                      &lt;/tr&gt;
                    &lt;/table&gt;
                  &lt;/div&gt;
        &lt;/body&gt;
</code></pre>

<p>Tried the following but not working</p>

<pre><code>foreach ($_POST  as $key =&gt; $value)
{
   if($key === 'labels') {
      // Decode JSON string to array
      $value = json_decode($value, true);
   }
   if (!is_array($value))
   {
      $message .= "&lt;br/&gt;".$key." : ".$value;
   }
   else
   {
      foreach ($value as $itemvalue)
      {
         $message .= "&lt;br/&gt;".$value." : ".$itemvalue;
      }
   }
} 
</code></pre>
