I'm developing a php based CMS, and I'm currently re-writing it into a state that is usable for customers. (My first version was internal only; and a somewhat kludgy mess :P)
In my first version, I had a function called HandlePostBack() which checked for the existance of a significant number of $_POST variables - the submit button from each possible form. If it was set, then the appropriate command would be executed.
I'm wondering if there is a better way? I could migrate to a switch, and look for a single $_POST variable included in each form, and then execute the command. A minimum of code would be nice, so I can extend the system quickly and easily.