I have a a submit button that when clicked does the following:
- Runs a func called getCartValues() that gathers data
- Validates some input text fields
- Sends variables to a PHP script
Since the input field validation might catch a problem the user will have to resubmit after making changes. The problem is, getCartValues() increments the data if it gets run more than once, so I need it to run only the first time the submit button is clicked and not on the following clicks. Anyone know how to code this?