I am a complete newcomer to php. I need to design a simple (i hope) web form as follows:
Header section – company information, contacts etc – writing results to one database table
Details section – line item information on product name, price etc – i need to have some form fields rows in the form visible on the page but also the ability to add new form field rows should the user want to enter more product line item details (i.e. They fill up all the available rows and need to add more) – these form entries need to write the form rows entry to a different (from above) database table, but reference the header section, so we know what header information was associated with what line item details.
I need the above to be on a one page web form, with one submit button.
So far I have the form completed, and each section is able to write to a database independently, but, I am struggling on the following areas:
1)Writing to 2 different database tables on the same web form page
2)Adding the ability for a user to insert more form fields (i.e. Rows) to add more line item details to the form as necessary
3)Having the header section reference all the line item details entered – i.e. A cross reference between the 2 database tables.
Hoping someone can point me in the correct direction
Thanks very much for your help