PHP - Programming Language
This course covers the basics of programming in PHP. Work your way through the videos/articles and I'll teach you everything you need to know to start your programming journey!

Creating A Calculator

Lesson 11
Author : 🦒
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; ?>