Well first off I see a couple of things that you may want to look into...
the "=" operator is used for assignments as in
$x = 4;
the value of $x will now contain 4
the "==" operator is used for comparison
if ($y == 3)
comparing $y to the number 3
The way you have you add subtract form setup $submit will be assigned the string "Add!" and $submit2 will be assigned "Subtract!"
What you can do is see which button was pressed by using the isset() function.
if (isset($submit) == TRUE) {
// add numbers here
} elseif (isset($submit2) == TRUE) {
// subtract numbers here
}
And as always there is more than one way to skin a cat... you can also use the strcmp() (string compare) function
if (strcmp("Add!",$submit) == 0) {
// add numbers here
} elseif (strcmp("Subtract!', $submit2) == 0) {
// subtract numbers here
}
One final note, you can always use a die() to stop the execution of your program at any point. I use this a lot for debugging code, such as die($submit) wich will stop the execution and print out the value in $submit. If you want to do multiple varialbes you can always do a series of echo() and then a die()...
Hope this helps...
PHPdev