Creating A Calculator
Lesson 11Author : 🦒
Last Updated : November, 2017
Code
site.phpCopy<form action="site.php" method="GET"> Num1: <input type="number" name="num1"> Num2: <input type="number" name="num2"> <input type="submit"> </form> <?php $num1 = $_GET["num1"]; $num2 = $_GET["num2"]; echo $num1 + $num2; ?>