PHP Trouble!

I am currently doing an assignment for a class and I cannot figure out why my code isn’t working correctly. I am supposed to be able to get the costs of everything and then print each individual product and the total cost. I get an error that reads:

[font=Times New Roman][size=medium]Parse error[/size][/font][font=Times New Roman][/size][size=medium]: syntax error, unexpected T_PRINT in[/size][/font][font=Times New Roman][/size][size=medium] [/size][/font][font=Times New Roman][/size][size=medium]/home/dheinle/public_html/cart.php[/size][/font][font=Times New Roman][/size][size=medium] [/size][/font][font=Times New Roman][/size][size=medium]on line[/size][/font][font=Times New Roman][/size][size=medium] [/size][/font][font=Times New Roman][/size][size=medium]34[/size][/font]
[font=Times New Roman][/size][/font]
[font=‘times new roman’][/size][size=medium]…when I try to submit. What am I doing wrong?[/size][size=medium][/font]

[font=‘times new roman’][/size][size=medium]

[/size][size=medium] Checkout <?php $BeeKnee = $_POST['BeeKnee']; $CatMeow = $_POST['CatMeow']; $WhoopAss = $_POST['WhoopAss']; $GiftHorse = $_POST['GiftHorse']; $LeftSock = $_POST['LeftSock'];
		if($BeeKnee > 0) {
			$BeeCost = $BeeKnee * 3.99;
		}	
		if($CatMeow > 0) {
			$CatCost = $CatMeow * 4.99;
		}
		if($WhoopAss > 0) {
			$WhoopCost = $WhoopAss * 2.95;
		}
		if($GiftHorse > 0) {
			$HorseCost = $GiftHorse * 0.00;
		}
		if($LeftSock > 0) {
			$SockCost = $LeftSock * 0.99;
		}
		$TotalCost = ($BeeCost + $CatCost + $WhoopCost + $HorseCost + $SockCost)
		
		print("Bee's Knees  00001  QTY $BeeKnee  Cost $BeeCost<br />");
		print("Cat's Meow  00002  QTY $CatMeow  Cost $CatCost<br />");
		print("Can of Whoop Ass  00003  QTY $WhoopAss  Cost $WhoopCost<br />");
		print("Gift Horse  00004  QTY $GiftHorse  Cost $HorseCost<br />");
		print("Missing Left Sock  00005  QTY $LeftSock  Cost $SockCost<br />");
		
	?>
</body>
[/font]

Your gonna laugh a little.

You forgot a semi-colon.

Sponsor our Newsletter | Privacy Policy | Terms of Service