Welcome to WebmasterWorld Guest from 54.166.198.6

Forum Moderators: open

Message Too Old, No Replies

looping forms for multiple database entries

     
2:00 am on May 17, 2012 (gmt 0)



Hi all,

I am trying to develop an invoice entry scheme.

The structure of my plan is as follows:

Three tables Invoice, Labor, Material in MySQL database.

Invoice One submit into database per invoice. Key invoice.invno.
Labor Possible multiple submits per invoice into database. Key labor.invno==invoice.invno
Material Possible multiple submits per invoice into database. Key material.invno==invoice.invno

I want to present the invoice form to be filled out and submitted. This is typically the invoice number, vendor, and date.

I then want to present the labor form, as many times as necessary, to be filled out and submitted each time. This is typically the invoice number, copied from the invoice form, a work code, a project code,
a description, and cost.

I then want to present the material form, as many times as necessary, to be filled out and submitted each time. This is typically the invoice number, copied from the invoice form, a work code, a project code, a description, a tax rate, and cost.

The final schematic of this might look like this:

Invoice #*$!, #*$!, #*$! One time submit.

labor - #*$!, #*$!, #*$!, #*$!, #*$! Multiple Submits. (Form looped twice).
- #*$!, #*$!, #*$!, #*$!, #*$!

material - #*$!, #*$!, #*$!, #*$!, #*$!, #*$! Multiple Submits. (Form looped three times)
- #*$!, #*$!, #*$!, #*$!, #*$!, #*$!
- #*$!, #*$!, #*$!, #*$!, #*$!, #*$!

I can code all of this to do one time submits using HTML, Javascript, Jquery, and AJAX, PHP as needed.

MY QUESTION IS: What is the best way to loop through the code for the labor and material forms? I think it should be easy but I don't know where to start.

Thanks, in advance, for any help you can give me.

RP
5:18 pm on May 17, 2012 (gmt 0)



SOLVED:

Well, I've embarrassed myself! You can't do it. It must be done through dynamic tables created by PHP or something like it.

R
 

Featured Threads

Hot Threads This Week

Hot Threads This Month