Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body bg bgcolor="aqua">
- <?php
- if(isset( $_GET["num1"])||isset( $_GET["num2"]))
- {
- if( $_GET["num1"] || $_GET["num2"] ) {
- echo "number 1 is ". $_GET['num1']. "<br />";
- echo "number 2 is ". $_GET['num2']. "<br/>";
- $sum = $_GET["num1"] + $_GET["num2"];
- echo "the sum of two numbers is". $sum;
- exit();
- }
- }
- ?>
- <html>
- <body>
- <form action = "<?php $_PHP_SELF ?>" method = "GET">
- enter first number : <input type = "text" name = "num1" /><br/>
- enter second number : <input type = "text" name = "num2" /><br/>
- <input type = "submit" name ="submit" value="submit"/>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement