post redirect get - Having $_POST data within a PHP Class -


i developed habit of working in php , wondering if correct way work or not.

basically, whenever have form, post data 'handler' file couple of basic checks (in cases) creates instance of class.

the class __construct automatically calls function within class , begins validating post data , redirects user accordingly, along $_get data display success message.

i'm aware post-redirect-get pattern, yet, curiosity is: okay redirect file , create class instance within there, or okay if post data directly class file ?


Comments

Popular posts from this blog

java - Ebean enhancement ignores a model -

ubuntu - How to disable Kernel Module Signing in linux -

SQL php on different pages to Insert (mysqli) -