RE: [PHP] sigh... forms
| From: | Henning Sittler | Date: | Tue, 09 Jul 2002 18:08:09 +0000 |
| Subject: | RE: [PHP] sigh... forms | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106417@lists.php.net to get a copy of this message | ||
Speaking of forms, and I'm sure lots have asked this before me, but anyone
know anywhere I can go to see some examples or existing code for
automatically generating and and validating dynamic forms?
Wait though, I'm already doing this myself. To explain further, what I
really want is an abstract set of php functions to say, ok, I want another
form with say 10 questions, and I want to define each question and set of
possible answers (input types and ranges) manually, and have the action
script automatically check that the input types and ranges for each question
are valid.
Henning Sittler
www.inscriber.com
-----Original Message-----
From: Chris Earle [mailto:chris@earleweb.com]
Sent: Tuesday, July 09, 2002 1:38 PM
To: php-general@lists.php.net
Subject: Re: [PHP] can I call a variable... using variables?
Why not just make the form's input names "var[]" then PHP will make them
into an array:
for ($i = 1; $i < 100; $i++)
{
if ($var[$i -1] > 0)
echo "Yup. ". $var[$i - 1] ." is greater than 0.";
}
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php