Chris W. Parker wrote:
What I'd like to do is get rid of all the if's and what not and throw
them into a function. What I thought of doing to replace all this is:
$formdata['fname']['data'] = (!empty($_GET['fname'])) ? $_GET['fname'] :
"" ;
$formdata['fname']['type'] = "name";
$_SESSION['form_e
InterJinn works something like this for it's FormJinn engine. So I'd say
it sounds quite good :)
Cheers,
Rob.
On Wed, 2003-10-01 at 19:43, Chris W. Parker wrote:
> Hey people.
>
> I'm trying to come up with an easy way to validate forms. I've got an
> idea and I'd like your feedback as well as s
* Thus wrote Chris W. Parker ([EMAIL PROTECTED]):
> Hey people.
>
>
> function validateFormData($input)
> {
> foreach($input as $field)
> {
> switch ($field['type'])
> {
> case 'name':
> // do the magic
>
On Wed, 2003-10-01 at 17:43, Chris W. Parker wrote:
> Hey people.
Hey
[snip]
> What I'd like to do is get rid of all the if's and what not and throw
> them into a function. What I thought of doing to replace all this is:
>
>
> $formdata['fname']['data'] = (!empty($_GET['fname'])) ? $_GET['fna
Hey people.
I'm trying to come up with an easy way to validate forms. I've got an
idea and I'd like your feedback as well as suggestions and/or your own
methods.
My idea is to have a multi-dimensional array with fields: data and type.
Let's say you have a form with three fields. First Name (fnam
5 matches
Mail list logo