Re: Re: php and dynamic forms

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 1:24 AM -0400 8/15/06, Robert Cummings wrote:
On Tue, 2006-08-15 at 13:02 +0800, Bigmark wrote:
 Does anyone have a simple example script.


In the first form include a hidden field that identifies the form when
you are checking the post values after submission. This way you know
exactly what form was submitted. Second if the first form has been
submitted then you know that you need to present the second form also.
THe second form should also have a hidden field so that it may be
identified upon submission. In this way you can detect which form was
submitted (submit buttons are problematic for determining which form was
submitted). Then when you detect that the second form was submitted you
can handle it's data as you please and then only present the first form.

A basic example follows (completely unchecked for typos/errors):

-snip- Rob's most excellent code.

To expand, one could also run the self referencing loop through a switch statement controlled by the hidden value and have as many "forms" as you wanted. I do this all the time.

tedd
--
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux