...

View Full Version : OOP Form Generator and Validator Tutorial



Badman3k
12-10-2008, 07:56 PM
I'm looking to build a form generator and validator in an OOP manner, but am struggling to find a decent tutorial that goes through the different methods of building one up.

Does anyone have a link to one that is worth a look?

Many thanks in advance,

mic2100
12-11-2008, 11:26 AM
hi,

why wud you want to build one yourself im sure there is one out there that you can use. I currently use the code igniter (http://www.codeigniter.com) framework and this contains all the validation and form build tools. Also the user guild is one of the most useful i have used before so wud recommend having a look.

Badman3k
12-11-2008, 08:59 PM
why wud you want to build one yourself im sure there is one out there that you can use.

Thanks Mic for your reply - I have looked at codeigniter and it looks like a great framework. However, I'm interested in building one because I have already built a framework for everything else that I need my site to do, and now just need to add the functionality of forms and validation. Hence I'm looking for a tutorial or tutorials to explain their ideas so I can build one up for what I need.

Are there any tutorials that people can think of? I've tried searching but get very spurious results.

Thanks again,

barkermn01
12-12-2008, 11:44 AM
Classes are realy easy


class newClass{
var $var;

function method(){
}
}

Then you load it in $new = new newClass;
Then you $new->var - gives var
or $new->method() run the method its that easy
The only thing to remember is when using a class var like the $var inside a method you use $this->var = 'bla';
Inside a method is a basic function you like its own script file so you have have $newVar = 'this'; then outside of that function running $newVar dose not exists

mic2100
12-12-2008, 05:51 PM
there is one other solution i can think of and that is

http://pear.php.net/search.php?q=form&in=packages



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum