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['XD'])){
- $XD = $_POST['XD'];
- $licz = $_POST['licz'];
- if ($licz == "q"){
- $kel = $XD+273.15;
- echo $kel;
- }
- elseif ($licz == "p"){
- $far=$XD*1.8+32;
- echo $far;
- }
- }
- ?>
- <form action="" method="POST">
- Wpisz temperaturę <input type="number" step="0.1" name="XD"<br>
- <br></label><input type="radio" name="licz" value="q">Kelwiny</label>
- <br></label><input type="radio" name="licz" value="p">Farenheit</label><br>
- <input type="submit" value="Obliczaj"><br>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement