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

c++ - No viable overloaded operator for references a map -

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - Cannot secure connection using TLS -