Retrieve Loop textbox
<p>page_form.php</p>

<pre><code>echo '&lt;div style="text-align:center;margin-left:25px;"&gt;
          &lt;form action="grad.php" method="post"&gt;               
            &lt;table width-"100%"&gt;
                  &lt;tr&gt;&lt;th style="padding:12px;"&gt;LETTER &lt;/th&gt;
                      &lt;th style="padding:12px;"&gt;INTERVAL&lt;/th&gt;
                      &lt;th style="padding:12px;"&gt;GT&lt;/th&gt;
                  &lt;/tr&gt;';
                 for($i=0;$i&lt;=5;$i++)
                  {
                   echo '&lt;tr&gt;&lt;td style="padding:12px;"&gt;&lt;input type="text" name="letter_'.$i.'"&gt;&lt;/td&gt;
                             &lt;td style="padding:12px;"&gt;&lt;input type="text" name="interval'.$i.'"&gt;&lt;/td&gt;
                             &lt;td style="padding:12px;"&gt;&lt;input type="text" name="gt'.$i.'"&gt;&lt;/td&gt;
                         &lt;/tr&gt;';
                  }
                  echo '&lt;tr&gt;&lt;td&gt;&lt;input type="submit" name="submit" value="submit"&gt;&lt;/td&gt;&lt;/tr&gt;';
           echo '&lt;/table&gt;
         &lt;/form&gt;
        &lt;/div&gt;';
</code></pre>

<p>grad.php</p>

<pre><code>$letter = $_POST['letter']; 
     $interval = $_POST['interval']; 
     $gt = $_POST['gt']; 
$s = mysql_query("INSERT INTO grad_table(letter,markint,gradepoint) VALUES('$letter',$interval,$gt) ");
</code></pre>

<p>I have given all the textboxes in a forloop. when I click on submit I need to get all the 5 textbox values, but right now iam getting only the 1st row.</p>

<p>Database Structure</p>

<pre><code>   Field   Type          Collation      Attributes     Extra
     id    bigint(10)                    UNSIGNED     AUTO_INCREMENT
   letter  varchar(255)  utf+general_ci  
   markint  bigint(10)
     gt     bigint(10)
</code></pre>
