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 gift;

[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 if

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

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. input type=submit name=submit value=Remove class=place_order/ What I am struggling with is to find an effective

Re: [PHP] Array / form processing

2010-10-07 Thread chris h
input type=submit name=submit value=Remove class=place_order/ 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. form target=... action=... input type=hidden name=submit value=Remove / input type=hidden name=product_so

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. ?php foreach($_REQUEST as $key = $val) { $$key = $val; echo $key . : . $val

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: input type=checkbox name=painDesc[] value=1 /Sharp input type=checkbox name=painDesc[] value=2 /Stabbing input type=checkbox name=painDesc[] value=3 /Jabbing When I do: foreach($_REQUEST

[PHP] Array form processing

2010-06-29 Thread Ron Piggott
I am trying to process a form where the user uses checkboxes: input type=checkbox name=painDesc[] value=1 /Sharp input type=checkbox name=painDesc[] value=2 /Stabbing input type=checkbox name=painDesc[] value=3 /Jabbing When I do: foreach($_REQUEST as $key = $val) { $$key = $val;

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: input type=checkbox name=painDesc[] value=1 /Sharp input type=checkbox name=painDesc[] value=2 /Stabbing input type=checkbox name=painDesc[] value=3 /Jabbing When I do:

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 a...@ashleysheridan.co.ukwrote: On Tue, 2010-06-29 at 16:54 -0400, Ron Piggott wrote: I am trying to process a form where the user uses checkboxes: input type=checkbox

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 ?php foreach($_REQUEST as $key = $val) { $$key = $val; echo $key . : . $val . br; if ( $val == Array ) { $i=0; foreach ($val) {

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: input type=checkbox name=painDesc[] value=1 /Sharp input type=checkbox name=painDesc[] value=2 /Stabbing input type=checkbox name=painDesc[] value=3 /Jabbing When I do: foreach($_REQUEST as $key = $val) {