Re: Simple question
| From: | Richard Davey | Date: | Sat, 20 Mar 2004 05:13:21 +0000 |
| Subject: | Re: Simple question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181014@lists.php.net to get a copy of this message | ||
Hello,
Saturday, March 20, 2004, 6:08:36 AM, you wrote:
w> Im sure this question seems primitive to most of you, im new to
w> using foreach with forms my question is how is the best way to keep
w> from getting the submit button from comming through with the
w> variables below is my code.
Two ways:
1) If you don't need to have a name for your submit button, then
removing this element will stop it appearing in the $_POST array in
the first place. If all you want to do is change the text of the
submit button, use the value="" attribute instead of name="".
2) If you DO need the name (because of JavaScript or something) then
just place a check in your foreach loop to ignore the $key called
"go".
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html