dane do walca wysokość H =
promień r =
"; } if(isSet($_POST['w'])) { $h = $_POST['h']; $r = $_POST['r']; $poleW = 2*M_PI*$r*$r+2*M_PI*$r*$h; $obW = M_PI*$r*$r*$h; setcookie("poleW",$poleW,time()+60,"/"); setcookie("obW",$obW,time()+60,"/"); setcookie("hw",$h,time()+60,"/"); setcookie("rw",$r,time()+60,"/"); header("Location: index.php"); } if(isSet($_POST['stozek'])) { echo "
dane do stożka wysokość H =
promień r =
bok l =
"; } if(isSet($_POST['s'])) { $h = $_POST['h']; $r = $_POST['r']; $l = $_POST['l']; $poleS = M_PI*$r*$r+M_PI*$r*$l; $obS = 1/3*M_PI*$r*$r*$h; setcookie("poleS",$poleS,time()+60,"/"); setcookie("obS",$obS,time()+60,"/"); setcookie("hs",$h,time()+60,"/"); setcookie("rs",$r,time()+60,"/"); setcookie("ls",$r,time()+60,"/"); header("Location: index.php"); } if(isSet($_POST['graniastoslup'])) { echo "
dane do graniastosłupa wysokość H =
bok a =
"; } if(isSet($_POST['g'])) { $h = $_POST['h']; $a = $_POST['a']; $poleG = 2*$a*$a+4*$a*$h; $obG = $a*$a*$h; setcookie("poleG",$poleG,time()+60,"/"); setcookie("obG",$obG,time()+60,"/"); setcookie("hg",$h,time()+60,"/"); setcookie("ag",$a,time()+60,"/"); header("Location: index.php"); } if(isSet($_POST['ostroslup'])) { echo "
dane do ostrosłupa wysokość H =
bok a =
"; } if(isSet($_POST['o'])) { $h = $_POST['h']; $a = $_POST['a']; $poleO = $a*$a+2*$a*$a*$h; $obO = 1/3*$a*$a*$h; setcookie("poleO",$poleO,time()+60,"/"); setcookie("obO",$obO,time()+60,"/"); setcookie("ho",$h,time()+60,"/"); setcookie("ao",$a,time()+60,"/"); header("Location: index.php"); } ?>