HTML/PHP business logic
Posted: Tue Dec 06, 2016 8:26 pm
I am trying to develop an application that is a document due date system for an accounting firm. I am having trouble with how to code a certain part of the business logic. The database has a table of customers and table of documents. There is a CustomerDocuments table that has each customers documents.
The part of the website I am having trouble with is the extending of documents. Each customerdocument has a duedate which can be extended.
I present a list of customers for the user to choose. when the user submits the page it displays the customerdocuments table for that customer. then the user can select checkboxes for each document that will be extended. after the user submits this page i present the documents that they selected and allow them to key in the 'disposition date', 'next due date', and 'disposition method'.
It's at this point I am having trouble with the php code of how to post or save the user input data and loop through the documents so that I can perform a SQL begin transaction and update each document due date and insert a record to a history table and commit it if successful, and roll back if there is any error.
a little extra info. the page where the user inputs the next due date and disposition method is what I'm having trouble with. I present a list of the document name, state, city, due date(which are from a sql select statement) and then the user input fields of the 'disposition date', 'next due date', and 'disposition method'. I don't know how to save the data from the sql select statement and the user input data to a $_POST or $_SESSION so that I can then use it on the next page to execute the SQL update transaction.
Thanks,
John
The part of the website I am having trouble with is the extending of documents. Each customerdocument has a duedate which can be extended.
I present a list of customers for the user to choose. when the user submits the page it displays the customerdocuments table for that customer. then the user can select checkboxes for each document that will be extended. after the user submits this page i present the documents that they selected and allow them to key in the 'disposition date', 'next due date', and 'disposition method'.
It's at this point I am having trouble with the php code of how to post or save the user input data and loop through the documents so that I can perform a SQL begin transaction and update each document due date and insert a record to a history table and commit it if successful, and roll back if there is any error.
a little extra info. the page where the user inputs the next due date and disposition method is what I'm having trouble with. I present a list of the document name, state, city, due date(which are from a sql select statement) and then the user input fields of the 'disposition date', 'next due date', and 'disposition method'. I don't know how to save the data from the sql select statement and the user input data to a $_POST or $_SESSION so that I can then use it on the next page to execute the SQL update transaction.
Thanks,
John