homepage Welcome to WebmasterWorld Guest from 107.20.131.154
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

    
looping forms for multiple database entries
pizzipie




msg:4454379
 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

 

pizzipie




msg:4454677
 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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved