Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. HTML:
  2.  
  3. <!DOCTYPE HTML>
  4. <html lang="pl">
  5. <head>
  6. <title>Kalkulator</title>
  7. <meta charset="utf-8">
  8. </head>
  9. <body>
  10. <form action="kalkulator.php" method="POST">
  11. <input type="number" name="a" placeholder="Pierwsza liczba">
  12. <input type="number" name="b" placeholder="Druga liczba">
  13. <input type="submit" value="Oblicz">
  14. </form>
  15. </body>
  16. </html>
  17.  
  18. PHP:
  19.  
  20. <!DOCTYPE HTML>
  21. <html lang="pl">
  22. <head>
  23. <title>Kalkulator</title>
  24. <meta charset="utf-8">
  25. </head>
  26. <body>
  27. <?php
  28. $x=$_POST['a'];
  29. $y=$_POST['b'];
  30. if ($x%$y==0) {
  31. echo "podzielne"; }
  32. else {
  33. echo "niepodzielne";
  34. }
  35. ?>
  36. </body>
  37. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement