
January 2nd, 2013, 03:44 PM
|
 |
For POny!
|
|
Join Date: Apr 2012
Location: Amsterdam
|
|
Quote: | Originally Posted by requinix Well, how far OOP do you want to go? I would have an object representing the form itself (doesn't have to be so specific as to be for that individual form) which acts like a data repository. You can get the form data from it, even as simply as wrapping functionality around $_POST, and push validation/error messages into it.
In general if you're considering anything remotely OOP then global variables and static/global functions are the wrong direction. |
Ha Requinix, As always thanks for your reply! I guess your right. This isn't really object orientated and I am more or less abusing it with static functions. I should indeed create some form class. (lazy as always  )
The pass by reference I like, but it's a bit of a pain in the * to add all those parameters. Hopefully I can soon show off my Form class. (edit: trying to build it now
Thanks!
Last edited by aeternus : January 2nd, 2013 at 03:50 PM.
|