Advertisement
Guest User

Untitled

a guest
Jan 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. <form action="" method="post">
  2. Temperatura F: <input type="text" name="F" value="" /> <br>
  3. Temperatura C: <input type="text" name="C" value="" /> <br>
  4. <input type="submit" value="wyslij" name="przycisk" />
  5. </form>
  6. <?php
  7. if(isset($_POST["przycisk"])){
  8. $F=$_POST["F"];
  9. $C=$_POST["C"];
  10. if($F!=''){
  11. function pf($F){
  12. $pf=(5/9)*($F-32);
  13. echo("Przeliczone Farenheity na Celsjusze: ".$pf);
  14. }
  15. pf($F);
  16. echo("<br>");
  17. }
  18. if($C!=''){
  19. function pc($C){
  20. $pc=32+((9/5)*$C);
  21. echo("Przeliczone Celsjusze na Farenhaity: ".$pc);
  22. }
  23. pc($C);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement