Forum Moderators: coopster
This determines which of the three tiers. There's only one possible combination of the three questions to be in tier 1, only one possible combination for tier 2, and the rest are simply tier 3. Below is what I came up with from what I learned reading about PHP today. It works, not sure if it's perfect. The echo "Tier x" was simply a test for me to see that it works, I would expect that this is where I will have to continue the statement to run the equation.
<?php
if ($_POST["timeinbusiness"] == "six") {
if ($_POST["homeowner"] == "hyes") {
if ($_POST["bankruptcy"] == "bno") {
echo "Tier 2";
} else { echo "Tier 3";}
} else { echo "Tier 3";}
} else { if ($_POST["timeinbusiness"] == "three") {
if ($_POST["homeowner"] == "hyes") {
if ($_POST["bankruptcy"] == "bno") {
echo "Tier 1";
} else { echo "Tier 3";}
} else { echo "Tier 3";}
} else { echo "Tier 3";}
}
?>
if ($_POST["timeinbusiness"] == "six") {
if ($_POST["homeowner"] == "hyes") {
if ($_POST["bankruptcy"] == "bno") {
echo "Tier 2";
<?php
if ($_POST["timeinbusiness"] == "six" && $_POST["homeowner"] == "hyes" && $_POST["bankruptcy"] == "bno")
{
echo "Tier 2";
}
?>
<?php
if ($_POST["timeinbusiness"] == "three" && $_POST["homeowner"] == "hyes" && $_POST["bankruptcy"] == "bno")
{
echo "Tier 1";
}
elseif ($_POST["timeinbusiness"] == "six" && $_POST["homeowner"] == "hyes" && $_POST["bankruptcy"] == "bno")
{
echo "Tier 2";
}
else
{
echo "Tier 3";
}
?>
<?php
$c = $_POST["cost"];
if ($c > 20000 && $c < 29999)
{
$c *= 0.05221;
echo $c;
}
?>
if (($c > 20000) && ($c < 29999))