Re: POSTing to XML...
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Thu, 02 Oct 2008 08:10:08 -0400
transpar3nt wrote:
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
<item> element. 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
There is no such limit in MySQL. And a database is the way to go - not XML.
But this is a bad design, anyway. Read up on database normalization, and if you're still having trouble with your database design try comp.databases.mysql.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- References:
- POSTing to XML...
- From: transpar3nt
- POSTing to XML...
- Prev by Date: Re: I need advice on how to create thousands of articles with PHP or else
- Next by Date: Re: fonts
- Previous by thread: Re: POSTing to XML...
- Next by thread: fonts
- Index(es):
Relevant Pages
|