| The Calculator | | This is one of the first scripts I made, so it's pretty simple. It uses built-in PHP functions for the more advanced calculations (sin, cos, degrees, radians, etc.) and for the simple calculations it just takes the first number and add, substract, multiply or divide it with the second. Take a look at the source and you'll probably figure out how it works pretty easily.
It uses two if statements to check which of the two forms have been submitted, and then calculate an answer using the method selected by the user.
|