title: How to send multiple same name input fields value via ajax post method
body: <p><a href="https://i.stack.imgur.com/osHn7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/osHn7.png" alt="enter image description here"></a></p>
  
  <p>I have two same name multiple input fields. I want to send all fields value from another page using jquery ajax post method but i am not getting all rows input fields value. Please review my code.</p>
  
  <p>Javascript code</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
  function getValue()
  {
      $.post("paidamt.php",
      {
        paidamt : $('#paidamt').val(),
        uid : $('#uid').val()
      },
        function( data){
          /*alert(data);*/
          $("#divShow").html(data);
      });  
   }
  &lt;/script&gt;
  </code></pre>
  
  <p>Html Code</p>
  
  <pre><code>&lt;div&gt;
  &lt;form method="post"&gt;
  &lt;table border="1"&gt;
  &lt;tr&gt;
  &lt;th&gt;Product&lt;/th&gt;
  &lt;th&gt;Price&lt;/th&gt;
  &lt;th&gt;Paid Amount&lt;/th&gt;
  &lt;th&gt;Check&lt;/th&gt;
  &lt;/tr&gt;
  &lt;?php
  $sql = mysql_query("SELECT * FROM `tbldemo`");
  while ($result = mysql_fetch_array($sql)) {
  ?&gt;
  &lt;tr&gt;
  &lt;td&gt;&lt;?php echo $result['pname']; ?&gt; &lt;/td&gt;
  &lt;td&gt;&lt;?php echo $result['price']; ?&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input type="text" name="paidamt[]" id="paidamt"&gt;&lt;/td&gt;
  &lt;td&gt;&lt;input type="checkbox" name="uid[]" id="uid" 
  value="&lt;?php echo $result['id']; ?&gt;"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php }
  ?&gt;
  &lt;/table&gt;&lt;br&gt;
  &lt;input type="button" name="submit" id="submit" 
  onclick="getValue(1)" value="Save Amt."&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;div id="divShow"&gt;
  &lt;/div&gt;
  </code></pre>