我试图将if语句添加到$totalReimb
和$totalMileReimb
中,但是似乎无法让它们添加仅添加$totalMileReimb
变量
$ratePerMile = 0.35;
$miles = $_POST['miles'];
$bfast = $_POST['bfast'];
$lunch = $_POST['lunch'];
$dinner = $_POST['dinner'];
$hotel = $_POST['hotel'];
$totalMileReimb = $miles * $ratePerMile;
$totalReimb = 0 + $totalMileReimb;
$Yes = "Yes";
$No = "No";
If语句
if ($miles < 1 or $miles > 3000){
// input error message
print ("<p> Input Error, Try Again! </p>");
// link back to the form
print ("<a href=\"juarez-biz-travel.html\">Return to form</a>");
} else {
if ($miles >=10 or $miles <= 3000 );{
if ($bfast == $Yes) $totalReimb + 8.50;
if ($lunch == $Yes) $totalReimb + 12.50;
if ($dinner == $Yes)$totalReimb + 18.50;
if ($hotel == $Yes) $totalReimb + 110.00;
}
print ("<p> The Total Is $$totalReimb! </p>");
}
答案 0 :(得分:1)
我认为您的错误是这样,unique-key-formate=com.ngdata.hbaseindexer.uniquekey.UniqueKeyFormatter
应该是以下之一:
$totalReimb + 12.50
$totalReimb = $totalReimb + 12.50
。