Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 815781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:44:13+00:00 2026-05-15T01:44:13+00:00

I am using tiny table with some input fields for posting in a page.

  • 0

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.

My code

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


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

            </tr>
<?php
}
?>

        </tbody>
    </table>

The print_r command outputs

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

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T01:44:14+00:00Added an answer on May 15, 2026 at 1:44 am

    Use explode. E.g.:

    foreach ($POST AS $key => $value) {
        if (strpos ($key, '_') !== false) {
            list($field, $id) = explode ('_', $key, 2);
    
            if ($value) {
                var_dump ($field, $id, $value);
            }
        }
    }
    

    Or if you know the Id:

    var_dump ($_POST['txtPaymentInstrumentNo_'.$Id]);
    

    Edit

    Simpler code. thx to notJim.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 507k
  • Answers 507k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Looks like you're missing gdata-client-core-1.0.jar May 16, 2026 at 4:06 pm
  • Editorial Team
    Editorial Team added an answer You can use a list to enclose the inout variable:… May 16, 2026 at 4:06 pm
  • Editorial Team
    Editorial Team added an answer If you want to be able to set the value… May 16, 2026 at 4:06 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I've recently created a very simple CRUD table where the user stores some data.
I am binding a datagrid to some data and using the AutoColumnGeneration. When using
I'm using tcpdf ( http://www.tcpdf.org/ ) to generate PDFs of some tables and images.
i have a static library which (among other things) implements a tiny function that
I was wondering about which way i should do the following. I am using
i m using tinymce editor on joomla component that behave strangly tinymce is already
I am trying to send a php script some content to be stored in
Background: I'm running multiple simulations on a set of data. For each session, I'm
I'm using a kind of load balancer over a small cluster that is able
I'm trying to extract EXIF information from images using jQuery. I've tried using a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.