<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 5: Good Idea for adding fields</title><link href="https://sourceforge.net/p/authlib/support-requests/5/" rel="alternate"/><link href="https://sourceforge.net/p/authlib/support-requests/5/feed.atom" rel="self"/><id>https://sourceforge.net/p/authlib/support-requests/5/</id><updated>2001-08-13T09:04:54Z</updated><subtitle>Recent changes to 5: Good Idea for adding fields</subtitle><entry><title>Good Idea for adding fields</title><link href="https://sourceforge.net/p/authlib/support-requests/5/" rel="alternate"/><published>2001-08-13T09:04:54Z</published><updated>2001-08-13T09:04:54Z</updated><author><name>Mohamed Nuur</name><uri>https://sourceforge.net/u/momad/</uri></author><id>https://sourceforge.netec2990585c89bada02f31fa18b6c0da132bc338f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I just came up with a great idea for being able to add &lt;br /&gt;
as many fields as you like.&lt;/p&gt;
&lt;p&gt;first of all, since this is an abstract class, it &lt;br /&gt;
needs to be able to do pretty much anything... so &lt;br /&gt;
here;'s what i came up with:&lt;/p&gt;
&lt;p&gt;instead of: name,age,sex,school,etc...&lt;br /&gt;
change to:  authfields[];&lt;/p&gt;
&lt;p&gt;like this:&lt;br /&gt;
you let the user make a hidden input called authfields &lt;br /&gt;
that contains comma delimited of all the fields...&lt;/p&gt;
&lt;p&gt;then you also let the user make a &amp;amp;quot;validate()&amp;amp;quot; &lt;br /&gt;
function, and pass it as a reference.. for starters &lt;br /&gt;
make a sample one..&lt;/p&gt;
&lt;p&gt;then &lt;/p&gt;
&lt;p&gt;$authfields = explode(&amp;amp;quot;,&amp;amp;quot;,$authfields);&lt;br /&gt;
while( list( $key, $val ) = each($authfields) )&lt;br /&gt;
{&lt;br /&gt;
// validate...&lt;br /&gt;
if( !validate( $key, $val ) )&lt;br /&gt;
{&lt;br /&gt;
return 0;&lt;br /&gt;
}&lt;br /&gt;
}&lt;/p&gt;
&lt;p&gt;[...]&lt;/p&gt;
&lt;p&gt;and for the db, use that loop to build a string for &lt;br /&gt;
the db manupilation and so on...&lt;/p&gt;
&lt;p&gt;NOTE: this would requuire rewriting most of the class.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>