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

  • SEARCH
  • Home
  • 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 6039573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:23:18+00:00 2026-05-23T06:23:18+00:00

I have a HTML table base invoice for collecting the details of a order.

  • 0

I have a HTML table base invoice for collecting the details of a order. New table rows can be added or deleted to this as the user needs them. Table has columns like item name, type, color, unit price, qty. I have place <input> and <select> tags inside <td> tags to collect data.

I need to submit a complete invoice to a database. The problem I’m having is I’m not sure how to get input values to my $_POST variables since the number of <input> and <select> vary from time to time based on the items on the invoice.

I can give dynamic or static names to input fields based on the table row id when they are generated using javascript. But how can I collect these data in the submit end to my php arrays or variables?

This is one table row. All other are similar to this.

<tr class="table_row_blue">
                <td class="table_data_index">1</td>
                <td><select>
                    <option>Test</option>
                    </select></td>
                <td class="table_data_item"><select>   
                    <option>&nbsp;2GB&nbsp;</option>
                </select></td>
                <td><input type="text" id="price_field" size="6"></td> 
                <td><input type="text" id="qty_field" size="6"></td> 
                <td><span class="table_subtotal">125,200.00</span></td>

            </tr>

Please give me some ideas to implement my idea.

  • 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-23T06:23:19+00:00Added an answer on May 23, 2026 at 6:23 am

    encapsulate all the varying parts in separate tables in the database. so you can store them separately and relate to each other with foreign keys.

    also it’s a good idea to use array naming for you HTML inputs like

    <input name="data[Invoice][field1]" />
    <input name="data[Invoice][field2]" />
    

    this gives you data, which is more structured and easy to iterate.

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

Sidebar

Related Questions

I have a html table like this: Invoice# Due Date Balance Select 12345 12/25/2011
I have an HTML table in my jsp page. This conains text fields and
I have an HTML table that contains some 500 rows. I have an input
I have this html table: <table class=table-all> <tbody> <tr> <td>BISFENOLO</td> <td>Bisfenolo-AF 10/10</td> <td class=right>€
I have a html table and insert a new row with table.insertRow() , but
I have this in HTML: <div class=dataBurst title=What is the Matrix?> <table align=center height=100%>
I have a webpage that displays a table the user can edit. After the
I have HTML table. I'm looping through table and iterate over each row whose
see fiddle i have html table and one textbox and one button.make cell selection
I have an html table with one of the headers spanning over 2 columns.

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.