Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- </head>
- <body>
- <style>
- ul, li {
- display: block;
- list-style: none;
- margin: 0 0 0 0;
- padding: 0;
- }
- a {
- color: black;
- text-decoration: none;
- }
- #glowny {
- text-align: center;
- margin-top: -55px;
- }
- div {
- font-style: italic;
- }
- </style>
- <a href="index.html"><img src="baner.png" width=100%></a>
- <ul>
- <li><a href="index.html">Menu</a></li>
- <li><a href="proste_dzialania.php">Proste działania</a></li>
- <li><a href="potegowanie.php">Potęgowanie</a></li>
- </ul>
- <div id="glowny">
- <b>POTEGOWANIE</b>
- <form method='POST' action='potegowanie.php'>
- <br><br>
- Podaj podstawę potęgi:
- <input type='text' name='pierwsza'>
- <br>
- Podaj dodatni, całkowity wykładnik potęgi:
- <input type='text' name='druga'>
- <BR><BR>
- <input type='submit' name='potegowanie' value='POTĘGOWANIE'>
- </form>
- </div>
- </body>
- </html>
- <?php
- $wynik = 0;
- if(array_key_exists('potegowanie', $_POST) && is_numeric($_POST["pierwsza"]) && is_numeric($_POST["druga"])) {
- echo "<center>Wynik działania wynosi: ";
- $wynik = pow($_POST["pierwsza"],$_POST["druga"]);
- echo $wynik."</center>";
- } else {
- echo "<center>Wpisz poprawne liczby</center>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement