Re: Self-Process php forms or not?
| From: | Manuel Lemos | Date: | Fri, 02 Oct 2009 08:00:38 +0000 |
| Subject: | Re: Self-Process php forms or not? | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general php.general |
| Request: | Send a blank email to php-general+get-298466@lists.php.net to get a copy of this message | ||
Hello,
on 10/02/2009 04:41 AM kranthi said the following:
> I try to avoid the use of hidden form elements as much as possible,
> especially for tracking whether a user has submitted a form or not...
>
> I use name="submit" for the submit button instead, that will pass the
> value of the submit button to the action script.
>
> above all i use a template engine, smarty to take care of the
> presentation for me(like deciding whether to show the form and/or a
> success/failure message)
That only works if the user clicks on that submit button. If the user
hits the enter key in a text input, the form is submitted but the submit
input variable is not set. That is why an hidden input is a safer solution.
--
Regards,
Manuel Lemos
Find and post PHP jobs
http://www.phpclasses.org/jobs/
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/