Monday, March 14, 2011
Simple Calculator PHP and HTML codes
Do you like this story?
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

This post was written by: Franklin Manuel
Franklin Manuel is a professional blogger, web designer and front end web developer. Follow him on Twitter
Subscribe to:
Post Comments (Atom)

0 Responses to “Simple Calculator PHP and HTML codes”
Post a Comment