Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE>
- <html lang="pl">
- <head>
- <meta charset="utf-8">
- <title>temp</title>
- <style>
- </style>
- </head>
- <body>
- <?php
- if(!empty($_POST['cel'])){
- $cel = $_POST['cel'];
- $licz = $_POST['licz'];
- if ($licz == "q"){
- $kel = $cel+273.15;
- echo $kel;
- }
- elseif ($licz == "p"){
- $far=$cel*1.8+32;
- echo $far;
- }
- }
- ?>
- <form action="" method="POST">
- Podaj temperature <input type="number" step="0.1" name="cel"<br>
- </label><input type="radio" name="licz" value="q">Kelwiny</label>
- </label><input type="radio" name="licz" value="p">Farenheit</label><br>
- <input type="submit" value="oblicz"><br>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement