My form posts the data to the same page. Since there are multiple forms that could be submitted to the same page I need to have logic to determine which form is submitted. I would first create a switch to determine which form was submitted checking for a particular POST value. I need to create a hidden field on each form to identify the form.:
The $page value would represent which content to show in the page when it reloads. Although this may be different based upon the outcome of the form processing (i.e. form passed, form had invalid data, etc.)PHP Code:
//Form was submitted - determine the form
So, now that I have a value ($page) to determine what content to show I could simply include it by default in the page.