Hello, I am building a small app for the electronics store I work for
that allows employees to enter product information and it outputs a
printable sales estimate for the customer. I have it working
flawlessly, except that since I am using a MySQL database to store the
input info, I am limited by the number of rows in the db table (20
sets of each field type = 20 item rows on the printout).
I am looking to pursue an XML approach which would allow me unlimited
number of items (each item has a description, qty, price, etc.). When
the user needs to add an item they simply click "add item" and
JavaScript populates another set of form fields meant for another
<itemelement. Unfortunately, since POST only accepts unique names
for each field I can't seem to figure out how to produce the xml so
each section of fields produces one item element and several
subelements.
How would I tell the script that I am grouping each of the item fields
(itemDesc1, itemPrice1, itemQty1, etc) together and to separate them
from (itemDesc2, etc.)?
I hope I'm clear about this, I am brand new to working with XML (oh
I'm using the DOM in PHP to produce the XML).
Thanks for any advice you may give.
- Keith
that allows employees to enter product information and it outputs a
printable sales estimate for the customer. I have it working
flawlessly, except that since I am using a MySQL database to store the
input info, I am limited by the number of rows in the db table (20
sets of each field type = 20 item rows on the printout).
I am looking to pursue an XML approach which would allow me unlimited
number of items (each item has a description, qty, price, etc.). When
the user needs to add an item they simply click "add item" and
JavaScript populates another set of form fields meant for another
<itemelement. Unfortunately, since POST only accepts unique names
for each field I can't seem to figure out how to produce the xml so
each section of fields produces one item element and several
subelements.
How would I tell the script that I am grouping each of the item fields
(itemDesc1, itemPrice1, itemQty1, etc) together and to separate them
from (itemDesc2, etc.)?
I hope I'm clear about this, I am brand new to working with XML (oh
I'm using the DOM in PHP to produce the XML).
Thanks for any advice you may give.
- Keith
Comment