In this script I'm not sure how to make these calculations work right... can someone help please? The $biannually and $yearly vars.
<?php
switch ($package) {
case "Special":
$price = "9.95";
print"<center>You have chosen the WebWired special.</center><br><br>";
break;
case "PackageA":
$price = "11.95";
print"<center>You have chosen Package A.</center><br><br>";
break;
case "PackageB":
$price = "15.95";
print"<center>You have chosen Package B.</center><br><br>";
break;
case "ResellerA":
$price = "29.95";
print"<center>You have chosen Reseller Package A.</center><br><br>";
break;
case "ResellerB":
$price = "39.95";
print"<center>You have chosen Reseller Package B.</center><br><br>";
break;
}
$monthly = "$price";
$biannually = "($price - 1) * 6";
$yearly = "($price - 2) * 12";
?>
<?php
print"
<input type=radio name=total value=$monthly>$$monthly /mo<br>
<input type=radio name=total value=$biannually>$$biannually /6 mo<br>
<input type=radio name=total value=$yearly>$$yearly /12 mo<br>
";
?>
<?php
switch ($package) {
case "Special":
$price = "9.95";
print"<center>You have chosen the WebWired special.</center><br><br>";
break;
case "PackageA":
$price = "11.95";
print"<center>You have chosen Package A.</center><br><br>";
break;
case "PackageB":
$price = "15.95";
print"<center>You have chosen Package B.</center><br><br>";
break;
case "ResellerA":
$price = "29.95";
print"<center>You have chosen Reseller Package A.</center><br><br>";
break;
case "ResellerB":
$price = "39.95";
print"<center>You have chosen Reseller Package B.</center><br><br>";
break;
}
$monthly = "$price";
$biannually = "($price - 1) * 6";
$yearly = "($price - 2) * 12";
?>
<?php
print"
<input type=radio name=total value=$monthly>$$monthly /mo<br>
<input type=radio name=total value=$biannually>$$biannually /6 mo<br>
<input type=radio name=total value=$yearly>$$yearly /12 mo<br>
";
?>