Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <title> Gruuby Projekt </title>
- <link rel="stylesheet" type="text/css" href="style.css" />
- </head>
- <body>
- <form method="POST">
- <label>A</label>
- <input type="number" name="pole_a">
- <label>B</label>
- <input type="number" name="pole_b">
- <input type="submit" value="Wyśli!">
- </form>
- </body>
- </html>
- <?php
- if(isset($_POST['pole_a']) && isset($_POST['pole_b'])){
- $a = $_POST["pole_a"];
- $b = $_POST["pole_b"];
- echo "A :: " . $a . "<br>";
- echo "B :: " . $b . "<br>";
- echo "<br>";
- echo "Dodawanie :: " . ($a + $b) . "<br>";
- echo "Odejmowanie :: " . ($a - $b) . "<br>";
- echo "Mnożenie :: " . $a * $b . "<br>";
- if($b == 0) echo "Dzielenie :: Nie przez $b ;><br>";
- else echo "Dzielenie :: " . round($a / $b, 2) . "<br>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement