Forum Moderators: coopster
IF condition1=yes, or IF condition2 = yes, printf(as below)
if $resident =="yes",
or
if $nonprofit=="yes"
printf(etc as below)
I have to use it as a value= in a hidden field to complete the one below.
<input type="hidden" name="shipcalc" value="<?php if ($resident == "yes") {printf ("%01.2f", $total * .085);}else {echo " ";}?>">
Thanks in advance.
What I'm doing is calculating state tax for an online order - only state residents are taxed. All non-profits (resident or not) are NOT taxed...
IF the customer is a resident
but is NOT a non-profit,
calculate tax (as below)
IF (the customer) is a non-profit
there is NO TAX (regardless of residency or not)
so it would be something like
<input type="hidden" name="statetax" value="<?php if ($resident == "yes" ¦¦ $nonprofit == "no" ) {printf ("%01.2f", $total * .085);}else {echo " ";}?>">
Can do?