Hi there,
Just wondering what everyones prefrences are with classes and user inputted data through the superglobals arrays.
So do you people prefer to:
a. call variables direct from the superglobals arrays from within classes
b. pass them as an function parameter?
The reason i ask is, for example, calling directly from say, the $_POST array within an object doesnt seem to appear very re-usable to me?
Also, for example, if i have one member function that registers a user by inputtin data into a database. If i then want to reuse the same class in another project, i'd have to change large chunks of the class around in order to add additional fields? Again, this doesnt seem very reusable.
So, i'm intrested to see how you guys incorporate the superglobals arrays into your script!
Thanks!