echo "My Calculator";
?>
My Calculator
$num1 = $_POST['num1'];
$num2 =$_REQUEST['num2'];
$run = $_REQUEST['run'];
switch($run)
{
case '+':print("The sum of the two numbers is: ".($num1+$num2));break;
case '-':print("The difference between the two numbers is: ".($num1-$num2));break;
case '*':print("The product of two numbers is: ".($num1*$num2));break;
case '/':print("The sum of the two numbers is: ".($num1/$num2));break;
}
?>
This article comes from the blog "ITeamsky-Yang Bo's Technology Space"
http://www.bkjia.com/PHPjc/478672.html
www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/478672.htmlTechArticlehtml head title ?php echo my calculator; ? /title /head script type=text/javascript function Onclick () { var num1 = document.getElementById(num1).value; var num2 = document.getEl...