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...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn