Retreiving dynamic post values
<p>I am using tiny table with some input fields for posting in a page.
I want to retrieve the data which the user fills up for a particular instrument number.</p>

<p>My code</p>

<pre><code>&lt;form name="frmDeposit" action="paymentdeposited.php" method="post"&gt;
    &lt;table cellpadding="0" cellspacing="0" border="0" id="table" class="tinytable" style="width:700px;"&gt;
        &lt;thead&gt;
            &lt;tr&gt;
                &lt;th&gt;&lt;h3&gt;Email&lt;/h3&gt;&lt;/th&gt;
 &lt;th&gt;&lt;h3&gt;Amount Paid&lt;/h3&gt;&lt;/th&gt;
 &lt;th&gt;&lt;h3&gt;Instrument Type&lt;/h3&gt;&lt;/th&gt;
 &lt;th&gt;&lt;h3&gt;Instrument No.&lt;/h3&gt;&lt;/th&gt;
 &lt;th&gt;&lt;h3&gt;Date Paid&lt;/h3&gt;&lt;/th&gt;
 &lt;th class="nosort"&gt;&lt;h3&gt;Date Deposited&lt;/h3&gt;&lt;/th&gt;
 &lt;th class="nosort"&gt;&lt;h3&gt;Bank Name&lt;/h3&gt;&lt;/th&gt;
 &lt;th class="nosort"&gt;&lt;h3&gt;Slip No.&lt;/h3&gt;&lt;/th&gt;
 &lt;th class="nosort"&gt;&lt;h3&gt;Submit&lt;/h3&gt;&lt;/th&gt;
            &lt;/tr&gt;
        &lt;/thead&gt;
        &lt;tbody&gt;
&lt;?php
foreach($paymentsdeposited as $paymentdeposited)
{


?&gt;
            &lt;tr&gt;
                &lt;td&gt;&lt;?php echo $paymentdeposited[email];?&gt;&lt;/td&gt;
                &lt;td&gt;&lt;?php echo $paymentdeposited[amount];?&gt;&lt;/td&gt;
 &lt;td&gt;&lt;?php echo $paymentdeposited[instrument];?&gt;&lt;/td&gt;
                &lt;td&gt;&lt;?php echo $paymentdeposited[instrumentnumber];?&gt;&lt;/td&gt;
 &lt;td&gt;&lt;?php echo $paymentdeposited[dated];?&gt;&lt;/td&gt;
 &lt;td&gt;&lt;input type="text"  name="txtDateDeposited_&lt;?php echo $paymentdeposited[pk_paymentinstrumentid];?&gt;"  class="field date-pick"/&gt;&lt;/td&gt; 
 &lt;td&gt;&lt;input type="text"  name="txtBankName_&lt;?php echo $paymentdeposited[pk_paymentinstrumentid];?&gt;"  class="field"/&gt;&lt;/td&gt; 
 &lt;td&gt;&lt;input type="text"  name="txtSlipNo_&lt;?php echo $paymentdeposited[pk_paymentinstrumentid];?&gt;"  class="field"/&gt;&lt;input type="hidden"  name="txtPaymentInstrumentNo_&lt;?php echo $paymentdeposited[pk_paymentinstrumentid];?&gt;"  value="&lt;?php echo $paymentdeposited[pk_paymentinstrumentid];?&gt;" class="field"/&gt;&lt;/td&gt; 
 &lt;td&gt;&lt;input type="submit"  name="btnSubmit1"  value="Submit"/&gt;&lt;/td&gt; 

            &lt;/tr&gt;
&lt;?php
}
?&gt;

        &lt;/tbody&gt;
    &lt;/table&gt;
</code></pre>

<p></p>

<p>The print_r command outputs </p>

<pre><code>Array
(
[txtDateDeposited_57] =&gt; 2010-05-07
[txtBankName_57] =&gt; pnb
[txtSlipNo_57] =&gt; 121
[txtPaymentInstrumentNo_57] =&gt; 57
[btnSubmit1] =&gt; Submit
[txtDateDeposited_51] =&gt; 
[txtBankName_51] =&gt; 
[txtSlipNo_51] =&gt; 
[txtPaymentInstrumentNo_51] =&gt; 51
[txtDateDeposited_52] =&gt; 
[txtBankName_52] =&gt; 
[txtSlipNo_52] =&gt; 
[txtPaymentInstrumentNo_52] =&gt; 52
[txtDateDeposited_45] =&gt; 
[txtBankName_45] =&gt; 
[txtSlipNo_45] =&gt; 
[txtPaymentInstrumentNo_45] =&gt; 45
[txtDateDeposited_47] =&gt; 
[txtBankName_47] =&gt; 
[txtSlipNo_47] =&gt; 
[txtPaymentInstrumentNo_47] =&gt; 47
)
</code></pre>

<p>I want to retrieve the values for id 57 for which he has entered values. But i am unable to construct logic for retrieving this value.I want to make it dynamic.</p>

<p>Please help me on this.</p>

<p>Thanks</p>
