I just came up with a great idea for being able to add
as many fields as you like.
first of all, since this is an abstract class, it
needs to be able to do pretty much anything... so
here;'s what i came up with:
instead of: name,age,sex,school,etc...
change to: authfields[];
like this:
you let the user make a hidden input called authfields
that contains comma delimited of all the fields...
then you also let the user make a "validate()"
function, and pass it as a reference.. for starters
make a sample one..
then
$authfields = explode(",",$authfields);
while( list( $key, $val ) = each($authfields) )
{
// validate...
if( !validate( $key, $val ) )
{
return 0;
}
}
[...]
and for the db, use that loop to build a string for
the db manupilation and so on...
NOTE: this would requuire rewriting most of the class.