Advertisement
elektryk798

PHP_new

Jan 13th, 2016
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.52 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <title>PHP trojkat</title>
  4.     </head>
  5.     <body>
  6.         <form action="trojkat.php" method="POST">
  7.             <input type="text" name="a" /></p>
  8.             <input type="text" name="h" /></p>
  9.             <?php
  10.                 if(isset($_POST['a']) and isset($_POST['h']))
  11.                     echo '<input type="text" name="pole" value='.$_POST['a']*$_POST['h'].' disabled /></p>';
  12.                 else
  13.                     echo '<input type="text" name="pole" value="wprowadź poprawne dane" disabled /></p>';
  14.             ?>
  15.             <input type="submit" value="oblicz"/></p>
  16.         </form>
  17.     </body>
  18. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement