<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <h1>Cookies</h1> <form action="" method='POST'> <input type="text" name="samOrd" size="3"> Samoas x $3.50 <br> <input type="text" name="minOrd" size='3'> Thin Mints x $4.00 <br> Shipping: <br> <input type="radio" name="shipp" value="regular"> Regular ($7)<br> <input type="radio" name="shipp" value="express"> Express ($9)<br> <input type="checkbox" name="donate" value="dona"> Donate $5 extra ?<br> <input type="submit" value="Buy"> </form> <?php $total = 0; if(isset($_POST['samOrd'])){ $total += $_POST['samOrd']*3.50; } if(isset($_POST['minOrd'])){ $total += $_POST['minOrd']*4; } if(isset($_POST['shipp']) == "regular"){ $total += 7; } if(isset($_POST['shipp']) == "express"){ $total += 9; } if(isset($_POST['donate'])){ $total += 5; } echo "<h1> Your Order: </h1>"; echo $_POST['samOrd'] . "--- Samoas"; echo "<br>"; echo $_POST['minOrd'] . "--- Thin Minuts"; echo "<br>"; echo "Total Order cost : $".$total; echo "<br>"; if(isset($_POST['donate'])){ echo "Thank You for your donation!"; } ?> </body></html>