0

Is using OOP to generate forms viable?

I want create a login/sign up system using php, and I was wondering if it would be a good idea to create a form object that requires 2 variables: a fields name array and data type (POST/GET). There will be like 4 or 5 functions that will do basic stuff like checking data length, comparing data against a data base, and a function that actually builds the form by using a for loop to go through the array.

23rd Feb 2019, 7:41 PM
Colin
Colin - avatar
1 Réponse
+ 12
Why not? It's a good idea.
10th Mar 2019, 8:46 PM
Igor Makarsky
Igor Makarsky - avatar