fastik
Постоялец
- Регистрация
- 8 Дек 2008
- Сообщения
- 78
- Реакции
- 7
не пашет че-то
вот так работает:
А когда пытаюсь сделать проверку не пашет:
вот так работает:
PHP:
<?
$T1 = $_POST['T1'];
$T2 = $_POST['T2'];
$T3 = $_POST['T3'];
$T4 = $_POST['T4'];
$T5 = $_POST['T5'];
$T6 = $_POST['T6'];
$T7 = $_POST['T7'];
$T8 = $_POST['T8'];
$T9 = $_POST['T9'];
$K1 = 9;
$K2 = 10;
$K3 = 15;
$K4 = 16;
$K5 = 20;
$K6 = 21;
$K7 = 21;
$K8 = 25;
$K9 = 35;
$total = ($T1 * $K1) + ($T2 * $K2) + ($T3 * $K3) + ($T4 * $K4) + ($T5 * $K5) + ($T6 * $K6) + ($T7 * $K7) + ($T8 * $K8)+ ($T9 * $K9);
$T10 = $_POST['T10'];
$T11 = $_POST['T11'];
$T12 = $_POST['T12'];
$T13 = $_POST['T13'];
$T14 = $_POST['T14'];
$T15 = $_POST['T15'];
$K10 = 45;
$K11 = 5;
$K12 = 6;
$K13 = 5;
$K14 = 4;
$K15 = 3;
$total1 = ($T10 * $K10) + ($T11 * $K11) + ($T12 * $K12) + ($T13 * $K13) + ($T14 * $K14) + ($T15 * $K15);
$T17 = $_POST['T17'];
$T18 = $_POST['T18'];
$T19 = $_POST['T19'];
$T20 = $_POST['T20'];
$T21 = $_POST['T21'];
$T22 = $_POST['T22'];
$T23 = $_POST['T23'];
$T24 = $_POST['T24'];
$T25 = $_POST['T25'];
$K17 = 5;
$K18 = 5;
$K19 = 15;
$K20 = 10;
$K21 = 5;
$K22 = 5;
$K23 = 10;
$K24 = 15;
$K25 = 0.5;
$total2 = ($T17 * $K17) + ($T18 * $K18) + ($T19 * $K19) + ($T20 * $K20)+($T21 * $K21) + ($T22 * $K22) + ($T23 * $K23) + ($T24 * $K24) + ($T25 * $K25);
//$total1 = надо подсчитать.
$total3 = ($total + $total1 + $total2)*1.25;
echo "<em><strong>$total3 у.е.</strong></em>";
?>
PHP:
<?
$T1 = $_POST['T1'];
$T2 = $_POST['T2'];
$T3 = $_POST['T3'];
$T4 = $_POST['T4'];
$T5 = $_POST['T5'];
$T6 = $_POST['T6'];
$T7 = $_POST['T7'];
$T8 = $_POST['T8'];
$T9 = $_POST['T9'];
$K1 = 9;
$K2 = 10;
$K3 = 15;
$K4 = 16;
$K5 = 20;
$K6 = 21;
$K7 = 21;
$K8 = 25;
$K9 = 35;
$total = ($T1 * $K1) + ($T2 * $K2) + ($T3 * $K3) + ($T4 * $K4) + ($T5 * $K5) + ($T6 * $K6) + ($T7 * $K7) + ($T8 * $K8)+ ($T9 * $K9);
$T10 = $_POST['T10'];
$T11 = $_POST['T11'];
$T12 = $_POST['T12'];
$T13 = $_POST['T13'];
$T14 = $_POST['T14'];
$T15 = $_POST['T15'];
$K10 = 45;
$K11 = 5;
$K12 = 6;
$K13 = 5;
$K14 = 4;
$K15 = 3;
$total1 = ($T10 * $K10) + ($T11 * $K11) + ($T12 * $K12) + ($T13 * $K13) + ($T14 * $K14) + ($T15 * $K15);
$T17 = $_POST['T17'];
$T18 = $_POST['T18'];
$T19 = $_POST['T19'];
$T20 = $_POST['T20'];
$T21 = $_POST['T21'];
$T22 = $_POST['T22'];
$T23 = $_POST['T23'];
$T24 = $_POST['T24'];
$T25 = $_POST['T25'];
$K17 = 5;
$K18 = 5;
$K19 = 15;
$K20 = 10;
$K21 = 5;
$K22 = 5;
$K23 = 10;
$K24 = 15;
$K25 = 0.5;
$total2 = ($T17 * $K17) + ($T18 * $K18) + ($T19 * $K19) + ($T20 * $K20)+($T21 * $K21) + ($T22 * $K22) + ($T23 * $K23) + ($T24 * $K24) + ($T25 * $K25);
//$total1 = надо подсчитать.
$total3 = ($total + $total1 + $total2)*1.25;
if (!$c_1) // это checkbox
{
$total4 = $total3 * 1.15;
echo "<em><strong>$total4 у.е.</strong></em>";
}
if($c_1)
{
echo "<em><strong>$total3 у.е.</strong></em>";
}
?>