Re: [PHP] Array / form processing

2010-10-08 Thread Sebastian Detert
Ron Piggott schrieb: I am writing a custom shopping cart that eventually the "cart" will be uploaded to PayPal for payment. I need to be able to include the option that the purchase is a gift certificate. At present my "add to cart" function goes like this: === # Gift Certificate: 1 is a gif

Re: [PHP] Array / form processing

2010-10-07 Thread chris h
I don't know what the context is like, but you may be better off just using an entire form here with hidden fields. i.e. Without knowing what else is going on in your page, and how the request is being handled on the server, it's kind of hard to give exact advice. :) Chris H.

Re: [PHP] Array / form processing

2010-10-07 Thread Ron Piggott
Many thanks, Chris. I have one additional question about this shopping cart project. I need to make a submit button for the purpose of removing an item from the shopping cart. What I am struggling with is to find an effective method for passing the product serial number (auto_increment in the

Re: [PHP] Array / form processing

2010-10-07 Thread chris h
$_SESSION['life_coaching_order'][$product][$gift]['quantity'] = $_SESSION['life_coaching_order'][$product][$gift]['quantity'] + 1; === ... === foreach ($_SESSION['life_coaching_order'] AS $coaching_fee_theme_reference => $value ) { === In this example $value would be an array. To test if it is

[PHP] Array / form processing

2010-10-07 Thread Ron Piggott
I am writing a custom shopping cart that eventually the "cart" will be uploaded to PayPal for payment. I need to be able to include the option that the purchase is a gift certificate. At present my "add to cart" function goes like this: === # Gift Certificate: 1 is a gift; 2 is personal use

Re: [PHP] Array form processing

2010-06-30 Thread tedd
At 4:54 PM -0400 6/29/10, Ron Piggott wrote: I am trying to process a form where the user uses checkboxes: Sharp Stabbing Jabbing When I do: foreach($_REQUEST as $key => $val) { $$key = $val; echo $key . ": " . $val . ""; } The output is: painDesc: Array I need to know the val

RE: [PHP] Array form processing

2010-06-30 Thread Ford, Mike
> -Original Message- > From: Ron Piggott [mailto:ron.pigg...@actsministries.org] > Sent: 29 June 2010 22:22 > > Am I on the right track? I don't know what to do with the second > "FOREACH" Sort of. > > > foreach($_REQUEST as $key => $val) { > $$key = $val; >echo $key . "

Re: [PHP] Array form processing

2010-06-29 Thread Jim Lucas
Ron Piggott wrote: > I am trying to process a form where the user uses checkboxes: > > Sharp > Stabbing > Jabbing > > When I do: > > foreach($_REQUEST as $key => $val) { > $$key = $val; >echo $key . ": " . $val . ""; > } > > The output is: > > painDesc: Array > > I need to know t

Re: [PHP] Array form processing

2010-06-29 Thread Ron Piggott
Am I on the right track? I don't know what to do with the second "FOREACH" $val) { $$key = $val; echo $key . ": " . $val . ""; if ( $val == "Array" ) { $i=0; foreach ($val) { echo "$val[$i]";

Re: [PHP] Array form processing

2010-06-29 Thread Shreyas Agasthya
The painDesc array is what that should be iterated. --Shreyas On Wed, Jun 30, 2010 at 2:27 AM, Ashley Sheridan wrote: > On Tue, 2010-06-29 at 16:54 -0400, Ron Piggott wrote: > > > I am trying to process a form where the user uses checkboxes: > > > > Sharp > > Stabbing > > Jabbing > > > > When I

Re: [PHP] Array form processing

2010-06-29 Thread Ashley Sheridan
On Tue, 2010-06-29 at 16:54 -0400, Ron Piggott wrote: > I am trying to process a form where the user uses checkboxes: > > Sharp > Stabbing > Jabbing > > When I do: > > foreach($_REQUEST as $key => $val) { > $$key = $val; >echo $key . ": " . $val . ""; > } > > The output is: > > p

[PHP] Array form processing

2010-06-29 Thread Ron Piggott
I am trying to process a form where the user uses checkboxes: Sharp Stabbing Jabbing When I do: foreach($_REQUEST as $key => $val) { $$key = $val; echo $key . ": " . $val . ""; } The output is: painDesc: Array I need to know the values of the array (IE to know what the user is