Advertisement
YavorGrancharov

Multiply Two Numbers

Dec 2nd, 2017
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <title>First Steps Into PHP</title>
  6.  
  7. </head>
  8. <body>
  9. <form>
  10.     N: <input type="text" name="num1" />
  11.     M: <input type="text" name="num2" />
  12.     <input type="submit" />
  13. </form>
  14. <?php
  15.     if (isset($_GET['num1']) && isset($_GET['num2'])) {
  16.         $num1 = intval($_GET['num1']);
  17.         $num2 = intval($_GET['num2']);
  18.         $res = $num1 * $num2;
  19.     }
  20.     echo $res;
  21. ?>
  22. </body>
  23. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement