I've this simple form, when the price is set to 120
$:
<input type="checkbox" name="addon[book]" value="120" /> book
<input type="checkbox" name="addon[plane]" value="420" /> Plane
Could I send two values (USD & €) with thr form?
EDIT:
I added name="addon[book]"
because I'll display the name
too
EDIT 2:
PHP:
foreach($addon as $name => $value) { echo 'your addons: '.$name; } $total = array_sum(array_map("intval", $_POST["addon"])); echo 'the total '.$total.' $';
12
instead of120
? Will the book be sold for12E
price? – zerkmsinput
elements for displaying? Please be more specific. – Felix Kling