php program that adds two numbers with user input fields code example Example: add two numbers in php <?php $x=15; $y=30; $z=$x+$y; echo "Sum: ",$z; ?>