NYCPHP Meetup

NYPHP.org

[nycphp-talk] Preferred method for parsing multi-row submitbuttons

billy reisinger billy.reisinger at gmail.com
Mon Nov 21 16:04:37 EST 2005


You probably already thought of this, but another alternative is to
have a couple of radio buttons with self-explanatory icons next to
them (edit and delete) and only one submit button.

On 11/21/05, Cliff Hirsch <cliff at pinestream.com> wrote:
> Yes, I thought of that and a form per row sure would be the easiest way
> to go. But I want to have the flexibility to add checkboxes to each row,
> if required, which would facilitate global, "do action to all checked"
> buttons.
>
> I just do something like this:
>
> foreach($_POST as $key => $value) {
>         if (substr($key,0,6) == "submit") {
>                 $temp = explode("_", $key);
>                 $action = $temp[1];
>                 $row = $temp[2];
>                 break;
>         }
> }
>
> It works -- just wondering if there's a better way.
>
> -----Original Message-----
> From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
> On Behalf Of Jeff Loiselle
> Sent: Monday, November 21, 2005 3:29 PM
> To: NYPHP Talk
> Subject: Re: [nycphp-talk] Preferred method for parsing multi-row
> submitbuttons
>
> Make each row its own form?
>
>  _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
>


--
Billy Reisinger
billy.reisinger at gmail.com
410.736.0148



More information about the talk mailing list