|
Posted by Tim Streater on 07/07/07 12:47
In article <Xns9965AE5A7B854arbpenyahoocom@69.28.186.121>,
Adrienne Boswell <arbpen@yahoo.com> wrote:
> Gazing into my crystal ball I observed Tim Streater
> <timstreater@waitrose.com> writing in news:timstreater-
> C4D85E.00453807072007@individual.net:
>
> > I
> > made each cell have its own form, because I couldn't find in any of the
> > docs I have whether a form can be submitted by any one of several
> > buttons. All the examples I ever saw only had one button, and the docs
> > didn't appear to cover the point.
> >
> >
>
> A form can have umpteen submit buttons.
Thanks, that's useful to know. Despite possible appearances :-) I am
keen to have stuff which is as standard as possible.
> It's a matter of the server side
> script to sort it all out. But... again, important to name the submit
> buttons, so when the script _does_ get the information, it knows which
> one did the submitting (if that's important to your script).
>
> So:
>
> <form method="post" action="myscript.php">
> ...various form elements...
> <input type="submit" name="sub1" value="Submit">
> ...more interesting elements...
> <input type="submit" name="sub2" value="Submit">
> </form>
>
> Then you will get either sub1/Submit or sub2/Submit in your form
> collection.
Right, I always use unique names anyway. SO far I've avoided having more
than one submit so I'll have to think through the implications there for
passing data.
Navigation:
[Reply to this message]
|