DOS adlı üyeden alıntı:
mesajı görüntüle
$hesapla= "45";
if (40 < $hesapla && $hesapla < 50) { $deger = 50; }else {$deger = 0;}
echo $deger; 10
●701
$hesapla= "45";
if (40 < $hesapla && $hesapla < 50) { $deger = 50; }else {$deger = 0;}
echo $deger; if($_POST){
$q1_sayi1=isset($_POST["q1_sayi1"]) && !empty($_POST["q1_sayi1"]) ? intval($_POST["q1_sayi1"]) : "0";
$q3_sayi2=isset($_POST["q3_sayi2"]) && !empty($_POST["q3_sayi2"]) ? intval($_POST["q3_sayi2"]) : "0";
$q4_sayi3=isset($_POST["q4_sayi3"]) && !empty($_POST["q4_sayi3"]) ? intval($_POST["q4_sayi3"]) : "0";
$hesapla=ceil($q1_sayi1*$q3_sayi2/$q4_sayi3)/50;
if($hesapla > 30 && $hesapla < 40):
$hesapla="40";
elseif($hesapla > 50 && $hesapla < 60):
$hesapla="60";
elseif($hesapla > 60 && $hesapla < 70):
$hesapla="70";
else:
$hesapla="0";
endif;
echo "Cikti <strong> {$hesapla}</strong>";
}