Why does this form pass a total of zero to sum.php instead of $235? Thanks in advance for replies?
Form Code:
<form id="registration" method="post" action="sum.php">
<input type="checkbox" name="selections[]" value="$100" id="member"
<?php //provide a form for resgistrants to make selections
$OK = isset($POST['selections']) ? true : false;
if ($OK && isset($missing) && in_array('$100', $POST['selections'])) { ?>
checked="checked"
<?php } ?>
/>
<label for="$100">Member</label>
</p>
<p>
<input type="checkbox" name="selections[]" value="$135" id="nonmember"
<?php
$OK = isset($POST['selections']) ? true : false;
if ($OK && isset($missing) && in_array('$135', $POST['selections'])) { ?>
checked="checked"
<?php } ?>
/>
<label for="$135">Non-Member</label>
<p><input name="send" id="send" type="submit" value="Calculate Total"/>
</form>
</fieldset>
sum.php code
<?php //total and print the registrant's selections
$total_amount = array_sum($_POST['selections']);
echo $total_amount;
?>