Tech Talk : PHP – Handling Multiple Forms In One Page

Xybernetics PHP - Handling Multiple Forms In One PageI have seen multiple ways to dealing with form submit, most of the times it is always to POST/GET the form to another PHP file? Uhhhhh… and file to maintain.
There is a more efficient way to deal with this… yes the grass is indeed greener on the other side of the fence.

One PHP page to do it all…”myExample.php”.
Below is a “myExample.php” file. I have added comments to help you our. I hope it is clear.

Note that you will have to use the submit button’s “name” to determine which form was submitted.

Leave a Reply

Your email address will not be published. Required fields are marked *