Shame you closed the thread.... kind of silly actually.
You're original issue was a malformed switch in calculate.php
You forgot to break each case.
Proper switch (which works)
PHP Code:
<?php
#BEGIN Variable Declarations & Initializations.
$First_Integer = $_POST['First_Field'];
$Operator = $_POST['Operation_Field'];
$Second_Integer = $_POST['Second_Field'];
#END Variable Declarations & Initializations.
switch ($Operator) {
#If $Operator is equal to "/" then divide $First_Integer by $Second_Integer.
case "/":
$result = $First_Integer / $Second_Integer;
break;
#If $Operator is equal to "*" then multiply $First_Integer by $Second_Integer.
case "*":
$result = $First_Integer * $Second_Integer;
break;
#If $Operator is equal to "-" then subtract $Second_Integer from $First_Integer.
case "-":
$result = $First_Integer - $Second_Integer;
break;
#If $Operator is equal to "+" then add $First_Integer and $Second_Integer.
case "+":
$result = $First_Integer + $Second_Integer;
break;
}
echo $result;
?>
I post this in case someone else runs across the thread and wants a solution since you did not post a solution yourself.
FYI.. I before E except after C.