Re: $HTTP_POST_VARS
| From: | Andrei Zmievski | Date: | Thu, 08 Mar 2001 22:18:44 +0000 |
| Subject: | Re: $HTTP_POST_VARS | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-585@lists.php.net to get a copy of this message | ||
This is really not the appropriate list for this...
On Thu, 08 Mar 2001, Edward A. McLain wrote:
> I may be wrong on this, but try setting your name="Name" to
> name="Name[]" instead.. This shoud force it into an array when it is
> sent over.. don't quote me on it though.. Do the same thing with Phone
> and let me know what happened.
>
> Oh.. you will also have to call this:
>
> while (list ($key, $val) = each ($HTTP_POST_VARS))
>
> {
>
> echo "$key => $val<br>\n";
>
> }
>
> Like this:
>
> while (list ($key, $val) = each ($HTTP_POST_VARS))
>
> {
>
> for ($x=0; $x < count($key); $x++)
> {
> echo "$key[$x] => $val[$x]<br>\n";
> }
>
> }
>
> Again.. I think that is right.. I haven't tested it though.
>
> Later,
> Ed McLain
>
> -----Original Message-----
> From: mat t [mailto:mat@remail.net]
> Sent: Thursday, March 08, 2001 4:10 PM
> To: php-gtk@lists.php.net
> Subject: [PHP-GTK] $HTTP_POST_VARS
>
>
> Please can you help:
>
>
>
> I can't send duplicate input types to $HTTP_POST_VARS
>
> For example:
>
> ---------------HTML-------------------
>
> First person:
>
>
>
> NAME <input type="text" name="Name" size="24"
> value="">
>
> <input name="Name_type" type="hidden" value="textbox">
>
>
>
> Phone No.<input type="text" name="Phone" size="24"
> value="">
>
> <input name="Phone_type" type="hidden" value="textbox">
>
>
>
> Second Person:
>
>
>
> NAME <input type="text" name="Name" size="24"
> value="">
>
> <input name="Name_type" type="hidden" value="textbox">
>
>
>
> Phone No.<input type="text" name="Phone" size="24"
> value="">
>
> <input name="Phone_type" type="hidden" value="textbox">
>
>
>
> -------------------------------------------------------
>
>
>
> Then when I use :
>
>
>
> reset ($HTTP_POST_VARS);
>
> while (list ($key, $val) = each ($HTTP_POST_VARS))
>
> {
>
> echo "$key => $val<br>\n";
>
> }
>
>
>
> Here is the output
>
>
>
> ----------------Output--------------------------
>
>
>
> Name =>
>
> Name_type => textbox
>
> Phone =>
>
> Phone_type => textbox
>
>
>
> ------------------------------------------------
>
>
>
> What happened to the Second person?
>
> How can I stop it ignoring duplicates and insert in the array 1 by 1?
>
>
>
> _____________________________________________________________
> Pick up your email anywhere in the world --->
> http://www.remail.net
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
-Andrei
"The only true currency in this bankrupt world is what we share with each
other when we're uncool." -- Lester Bangs, from the film 'Almost Famous'