Coding one to many relationships
I'm not sure this is the right place to put this in the forums, as it's not just PHP related, but it is to do with application design and I happen to be using PHP so here goes:
Does anyone have any examples of coding HTML forms for handling one to many relationships?
For example an invoice is a classic example of a one to many data relationship where the invoice header (client details, invoice date, etc) is on the one side and the invoice detail lines (product being purchased, quantity, cost, etc) are on the many side.
I know how to set this up on the database side of things, I just haven't found a really good method of handling this in HTML forms that let you easily and quickly add / change / delete invoice detail lines.
I guess that some AJAX would come in handy here so that there's isn't lots of page refreshing. I've looked at data grids in the past but most of them seem to be set up to display and change lines of data but not to quickly and easily add and delete lines.
Can anyone point me in the direction of something that might help me out? Any articles or examples?