OK that makes sense, thank you everyone for the replies.
What I don't get than is how to get the value for my variable pushed to my $sum command.
Is there a way to say do something like this perhaps?: If the box is checked than my $four100wattreg = 2.39, if the box is unchecked than $four100wattreg = 0
What would be the best way to handle that?
to explain this post further so you understand why it is not correct, when you set the variable $four100wattreg = $_POST["four100wattreg"]; and then again $four100wattreg=2.39;
you are overwriting the first value that you set $four100wattreg to with the new value (2.39). You should be using unique variable names for each unique value that you want PHP to remember.
if (!isset($_POST['checkbox'])
{
//checkbox not checked
$four100wattreg = 0;
}
where is $_POST['checkbox'] being passed to the server?