Validation+Filtering |
[eluser]RESPECT[/eluser]
try to follow what colin said, keep things divided up as it was 'intended' to be with the term MVC (model, view, controller). I know what I'm about to say now goes against my previous thoughts (please dont colin ) but it would be better to have those validation rules tied into your controller as it allows your application to be more agile, rather then having the rules set in the model. If you have base validation rules and functions, just setup another controller, then make all of your other controllers extend it. ex. Random controller(magic happens with the extend part) Code: <?php Validation Controller Code: <?php Your way is good but try not to put that sorta stuff in the model...though error checking like this: Code: function view_all_from($table) { Hope this helps, Respect |
Messages In This Thread |
Validation+Filtering - by El Forum - 09-25-2008, 06:04 PM
Validation+Filtering - by El Forum - 09-25-2008, 06:32 PM
Validation+Filtering - by El Forum - 09-25-2008, 07:05 PM
Validation+Filtering - by El Forum - 09-25-2008, 10:13 PM
Validation+Filtering - by El Forum - 09-25-2008, 11:40 PM
Validation+Filtering - by El Forum - 09-26-2008, 10:10 PM
Validation+Filtering - by El Forum - 09-26-2008, 11:29 PM
Validation+Filtering - by El Forum - 09-27-2008, 03:22 PM
Validation+Filtering - by El Forum - 09-28-2008, 05:16 PM
Validation+Filtering - by El Forum - 09-29-2008, 02:35 PM
Validation+Filtering - by El Forum - 09-29-2008, 02:52 PM
Validation+Filtering - by El Forum - 09-29-2008, 09:46 PM
Validation+Filtering - by El Forum - 09-30-2008, 09:32 AM
|