I started using classes in php. Fun!
I now have a form, which is generated by a class. Submitting this form (with ajax or method=post and a submitbutton) raises a problem for me.
Usually, i have the current page in the 'action =' and if a certain condiion is met, a function on a 'functions.php' is executed.
Now that i use classes, i would like to have all intelligence out of the pages and into the class. (Please don' tell me to start using a 'real' language :)) I would love to have this:
<form mehod="post" acion="$object->function()" >
But that's not possible. So how to proceed. I do have a lot of separate forms on that page, and on all other pages (don't ask me, it's a trial-thingy). I woul not like to post on every page a number of conditional statements asking: if this form has nbeen submitted, then please do this, but if it was he other form...
I know i don't give much o go on, but that's bcs it's a bit vague in my head atm.
Any suggestion is welcome.