Monday, March 14, 2011

Simple Calculator PHP and HTML codes



This is sample of a simple calculator that can only input 2 numbers.

num1 + num2 = answer














HTML code:
<html>
<body>

<form action="calc.php" method="POST">
<table><tr><td><fieldset>
<legend>
Simple Calculator
</legend>
   

1st no.: <input type="text" name="1st_no" size=1><br>
2nd no.: <input type="text" name="2nd_no" size=1><br>
[ + ] - Addition <br>
[ - ] - Subtraction<br>
[ * ] - Multiplication<br>
[ / ] - Division<br>

What do you want to do? <input type="text" name="choice" size=1> <input type="submit" value="Calculate!" name="calculate"></fieldset>
</td></tr></table>
</form>
</body>
</html>

Download calc.php(with html code) here

0 Responses to “Simple Calculator PHP and HTML codes”

Post a Comment

All Rights Reserved DevCod | Blogger Template by Bloggermint