On 8 Apr 2005 Chris Bruce wrote:
> I need to be able to break out the tax, amount and type that were
> entered on each line of a form and then apply calculations and do
> database inserts on each. As you can see what I need is in sets of
> three denoted by the integer at the end (tax0, amount0,
Beautiful Chris. That does make things easier. Thanks.
On Apr 8, 2005, at 1:02 PM, Chris Boget wrote:
I can't figure out how to separate these variables and values so that
I
can do what I need to do.
I've got
foreach($_POST as $var=>$value) {
}
but can't seem to figure out what to do inside.
Ideas
> I can't figure out how to separate these variables and values so that I
> can do what I need to do.
> I've got
> foreach($_POST as $var=>$value) {
> }
> but can't seem to figure out what to do inside.
> Ideas??
What you could do is rename the form field names. Instead of naming
the field 'tax0
Hello,
Here is an example of what could be posted from a form:
Array
(
[tax0] => GST
[amount0] => 10.23
[type0] => Goods
[tax1] => GST
[amount1] => 6.5
[type1] => Goods
[tax2] => HST
[amount2] => 3.54
[type2] => Goods
[tax3] => HST
[amount3] => 8.95
[
4 matches
Mail list logo