Ok everyone,
I am attempting to set up a pseudo shopping cart for people to request specific items. There is no transaction taking place, just an e-mail notification and also a simple addition to a few database tables.
I have created some instructions to help me get to the end result.
Firstly, the information in the tables we are accessing is related in a many-to-one relationship between tblRequest and tblRequestDetails.
That being said, here are the steps I think I need to take to ensure the information is placed properly into the database.
- Trim all user input.
- Check to make sure all required values are entered.
- Test the Primary Key is not being duplicated (user tries to enter request twice).
- Store values to "RequestArray"
- If "RequestArray"contains information show the RequestDetail information (Model/Quantity Selection).
- Trim user entered information.
- Check that all required values are entered.
- Store RequestDetail information to "RequestDetailArray"
- Allow looping until user clicks "Checkout"
- Perform validation once again with Primary Key of "RequestArray"to ensure no other user has entered the same request.
- Run SQL command to enter information into database "RequestArray"entered first, then values from "RequestDetailArray" looped until empty).
- Send e-mail notification to desired parties.
- Clear "RequestArray"and "RequestDetailArray"
- Forward to desired page.
- Missing anything?