php3-list | 199807
Date: 07/12/98
- Next message: Richard Lynch: "Re: [PHP3] multiple submits...."
- Previous message: Joe Koeniger: "Re: [PHP3] The ? operator"
- In reply to: Rasmus Lerdorf: "Re: [PHP3] multiple submits...."
- Next in thread: brian moore: "Re: [PHP3] multiple submits...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, 12 Jul 1998, Rasmus Lerdorf wrote:
> > I have a huge form with a pile of submits, with the 'name' of the submit
> > having the key that I'm looking up (and a bunch of other stuff in
> > hidden variables: hence why I need submit :)), like
> >
> > <input type="submit" name="SHOW:1" value="Show me!">
> > <input type="submit" name="SHOW:2" value="Show me!">
> > etc.
> >
> > Is there a way to walk through the SHOW:* variables and find 'which'
> > submit was used?
>
> Would be easier if you named them SHOW[1] and SHOW[2] instead of SHOW:1
> and SHOW:2. If you can change the names then you can simply walk through
> them with:
>
> while(list($key,$value) = each($SHOW)) {
> echo "SHOW[$key] = ".$value;
> }
Submit only returns one variable - specifically name=value, what you
should do is have different value's for each submit (how is the user to
know that different buttons do differnt things if you don't?)
-- PHP 3 Mailing List http://www.php.net/ To unsubscribe send an empty message to php3-unsubscribe <email protected> To subscribe to the digest list: php3-digest-subscribe <email protected> For help: php3-help <email protected> Archive: http://www.tryc.on.ca/php3.html
- Next message: Richard Lynch: "Re: [PHP3] multiple submits...."
- Previous message: Joe Koeniger: "Re: [PHP3] The ? operator"
- In reply to: Rasmus Lerdorf: "Re: [PHP3] multiple submits...."
- Next in thread: brian moore: "Re: [PHP3] multiple submits...."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

