I've been figuring out ways on how to work this out but I can't seem to. I'm a beginner in PHP and I'm so lost right now. I want to sum the selected checkboxes's values and post the sum of the values in a PHP page.
Here's my HTML so far
<input class="wrapped-input" type="checkbox" value="290" id="widgetu15650_input" name="custom_U15293[]" tabindex="1"/>
<label for="widgetu15650_input"></label>
Here's my PHP so far
if (isset($_POST['u15175'])) {
if($_POST){
$val = 0;
foreach($_POST['custom_U15293'] as $custom_U15293){
$val += $custom_U15293;
}
echo $val;
}
}