J
John.exe
Guest
<?php
if($_POST['type'] == "Cheese Pizza"){
echo "Total: $$count1";
}elseif($_POST['type'] == "Philly Cheese Steak"){
echo "Total: $$count2";
} else ($_POST['type'] == "Our Famous Pizza"){
echo "Total: $$count3";
}
?>
I had it working, but now it's saying "Parse error: syntax error, unexpected '{' in /home/username/public_html/pizza/ordertotal.php on line 62"
Line 62 is the line with "Our Famous Pizza"
Any help is appreciated!
<?php
//when pizza and math combine
$count1 = $_POST['count'] * 12.00;
$count2 = $_POST['count'] * 14.00;
$count3 = $_POST['count'] * 18.50;
?>
I want it to be able to post how many pizza's a user wants and it the count of how much a pizza will be. On the order form I made it selectable of which pizza they want and how many pizza's of that kind. The code above does the math for you.
if($_POST['type'] == "Cheese Pizza"){
echo "Total: $$count1";
}elseif($_POST['type'] == "Philly Cheese Steak"){
echo "Total: $$count2";
} else ($_POST['type'] == "Our Famous Pizza"){
echo "Total: $$count3";
}
?>
I had it working, but now it's saying "Parse error: syntax error, unexpected '{' in /home/username/public_html/pizza/ordertotal.php on line 62"
Line 62 is the line with "Our Famous Pizza"
Any help is appreciated!
<?php
//when pizza and math combine
$count1 = $_POST['count'] * 12.00;
$count2 = $_POST['count'] * 14.00;
$count3 = $_POST['count'] * 18.50;
?>
I want it to be able to post how many pizza's a user wants and it the count of how much a pizza will be. On the order form I made it selectable of which pizza they want and how many pizza's of that kind. The code above does the math for you.