I developed a habit of working like this in PHP and I was wondering if it is a correct way to work or not.
Basically, whenever I have a form, I would post the data to a 'handler' file which does a couple of basic checks (in certain cases) then creates an instance of the class.
The class __construct automatically calls a function within the class and begins validating the post data and redirects the user accordingly, along with a $_GET data to display a success message.
I'm aware this is the Post-Redirect-Get pattern, yet, my curiosity is: is it okay to redirect to a file and create the class instance within there, or is it okay if you post the data directly to the class file ?