Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HTML:
- <!DOCTYPE HTML>
- <html lang="pl">
- <head>
- <title>Kalkulator</title>
- <meta charset="utf-8">
- </head>
- <body>
- <form action="kalkulator.php" method="POST">
- <input type="number" name="a" placeholder="Pierwsza liczba">
- <input type="number" name="b" placeholder="Druga liczba">
- <input type="submit" value="Oblicz">
- </form>
- </body>
- </html>
- PHP:
- <!DOCTYPE HTML>
- <html lang="pl">
- <head>
- <title>Kalkulator</title>
- <meta charset="utf-8">
- </head>
- <body>
- <?php
- $x=$_POST['a'];
- $y=$_POST['b'];
- if ($x%$y==0) {
- echo "podzielne"; }
- else {
- echo "niepodzielne";
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement