View Single Post
Old 03-07-2008, 08:52 AM   #2 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
$_REQUEST contains everything in $_GET and $_POST.

so, to read every variable sent over, you would just need to loop through the $_REQUEST array.

never tried to make one myself, but you could take the drupal approach. they define forms in arrays. then there's a separate 'validate' handler function, and then a 'submit' handler.

here's an example of a form element defined in drupal:
PHP Code:
$form['value1'] = array(
      
'#type' => 'textfield',
      
'#title' => 'Value 1',
      
'#size' => 4,
      
'#maxlength' => 4,
      
'#description' => 'The first value to perform the multiplication with.'
); 
so you could take a structure like that and dynamically create your form. then, you could loop through the request vars to validate and submit. how to make that really generic may be tricky.
__________________
testing 1 2 3
sde is offline   Reply With Quote