Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form action="" method="post">
- Temperatura F: <input type="text" name="F" value="" /> <br>
- Temperatura C: <input type="text" name="C" value="" /> <br>
- <input type="submit" value="wyslij" name="przycisk" />
- </form>
- <?php
- if(isset($_POST["przycisk"])){
- $F=$_POST["F"];
- $C=$_POST["C"];
- if($F!=''){
- function pf($F){
- $pf=(5/9)*($F-32);
- echo("Przeliczone Farenheity na Celsjusze: ".$pf);
- }
- pf($F);
- echo("<br>");
- }
- if($C!=''){
- function pc($C){
- $pc=32+((9/5)*$C);
- echo("Przeliczone Celsjusze na Farenhaity: ".$pc);
- }
- pc($C);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement