title: serialize Id's and PHP for each
body: <p>Hello i need some jQuery help by giving serial ids to input text like <code>qty0</code> , <code>rate1</code> , <code>amt2</code>  i++ so on document load or by giving addnew row button</p>
  
  <p>This is my html code</p>
  
  <pre><code>&lt;tr class="item-row1"&gt;
     &lt;td&gt;&lt;input id="qty1" name="qty1" type="text"&gt;&lt;/td&gt;
     &lt;td&gt;
        &lt;select id="selectitem1"&gt;
           &lt;option value=""&gt;Select One...&lt;/option&gt;    
           &lt;option value="17"&gt;Apple&lt;/option&gt;
           &lt;option value="18"&gt;Orange&lt;/option&gt;
           &lt;option value="9"&gt;Banana&lt;/option&gt;     
        &lt;/select&gt;
     &lt;/td&gt;
     &lt;td&gt;&lt;input id="desc1" name="desc1" type="text"&gt;&lt;/td&gt;
     &lt;td&gt;&lt;input id="rate1" name="rate1" type="text"&gt;&lt;/td&gt;
     &lt;td&gt;&lt;input id="amt1"  name="amt1"  type="text"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  
  &lt;tr class="item-row2"&gt;
     &lt;td&gt;&lt;input id="qty2" name="qty2" type="text"&gt;&lt;/td&gt;
     &lt;td&gt;
         &lt;select id="selectitem"&gt;
            &lt;option value=""&gt;Select One...&lt;/option&gt;    
            &lt;option value="17"&gt;Apple&lt;/option&gt;
            &lt;option value="18"&gt;Orange&lt;/option&gt;
            &lt;option value="9"&gt;Banana&lt;/option&gt;     
         &lt;/select&gt;
     &lt;/td&gt;
     &lt;td&gt;&lt;input id="desc2" name="desc2" type="text"&gt;&lt;/td&gt;
     &lt;td&gt;&lt;input id="rate2" name="rate2" type="text"&gt;&lt;/td&gt;
     &lt;td&gt;&lt;input id="amt2"  name="amt2" type="text"&gt;&lt;/td&gt;
  &lt;/tr&gt;
  </code></pre>
  
  <p>and so on..! </p>
  
  <p>Please help me with creating a php code right now i am using this code </p>
  
  <pre><code>$id1 = $_POST['id1'];
  $qty1 = $_POST['qty1'];
  $qty2 = $_POST['qty2'];
  $rate1 = $_POST['rate1'];
  $rate2 = $_POST['rate2'];
  sql_query =" INSERT INTO products (id,qty,rate,amt) WHERE id = $id VALUES ($id,$qty,$rate,$amt);
  </code></pre>
  
  <p>I want to create a loop code and i don't know how will i get all possible values from page and post into MySQL <code>WHERE id = $id + number</code></p>