to the second post:
If you have all of the data values such as quantity and price in the database; then update the total price because you changed something; technically it would resubmit the same values.
All of your price, tax, and totals…etc… should be calculated using the database fields. Not from just the page itself.
Also you could have a script that looks for changes upon submit…if it doesn’t detect any it just leaves everything alone, if it does detect a change it uses the “update” command for recordsets to update that value.
So basically all of your entered items(quantity, price) should be in a database matched to a session ID…
Whenever it loads the page to view the “invoice”…ya know like most online shopping carts display how much of this and that…
those values once entered and submitted, should be stored in a db… then if the customer wants to go back and change anything, when it views the values- those values in the fields should be pulled from the database…then when someone changes the numbers…use the update command for recordsets and it will update all the records…
When the form is loaded up the first time-there will be no objects in the recordset, so you have to have error handling to display 0 in the fields upon load.
Now the customer starts ordering stuff:
lets say that you have “item 1” and “item 2”
customer buys 2 of item 1 and 4 of item 2:
item 1 costs $1.00
item 2 costs $5.00
So the forms would look like:
Description Price * Quantity Total
Item 1 $1.00 * 1 $1.00
Item 2 $5.00 * 4 $20.00
Ok this is what they entered: These values should then be stored in the database.
But wait the customer meant to buy 6 of Item 1!!!
So after they submitted the information to the database, the page refreshed itself…this time the form fields could pull data from the recordset. The data they entered into the database is then displayed in the form fields…which are editable!!!
So they just change the quantity of item 1 to 6 and then click submit!!!
Using the update for recordsets command; it merely updates the data in the DB and then refreshes the page showing the new data…
If the customer is done shopping, they click “done” and then get forwarded to the final pages…