Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <body>
- Flächenhinhalt oder Kreisumfang berechnen<br><br>
- <form action="<?php echo $_SERVER['PHP_SELF']?>" method="GET">
- <input type="text" name="radius"> Radius<br><br>
- <input type="radio" name="berechnung" value="u" size="10" checked> Umfang <br>
- <input type="radio" name="berechnung" value="i" size="10"> Flächeninhalt
- <input type="submit" name="submit" value="Berechnen">
- </form>
- <?php
- if(isset($_GET['test']))
- {
- $umfang=2 * pi() * $_GET['radius'];
- $flaecheninhalt = pi() * $_GET['radius'] ^ 2;
- }
- if($_GET['berechnung']=="u")
- {
- echo"Der Umfang beträgt: $_GET['umfang'];"
- }
- else
- {
- echo"Der Flächeninhalt beträgt: $_GET['flaecheninhalt];"
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement