Beispiel #1
0
if (empty($_GET["length"] && $_GET["width"] && $_GET["height"] && $_GET["weight"])) {
    echo "Your pizza is imaginary. Please enter real dimensions and/or weight";
    exit;
}
?>

<!DOCTYPE html>
<html>
<head>
    <title>Your Car Dealership's Homepage</title>
</head>
<body>
  <h1>Here is the cost of shipping your pizza</h1>
  <ul>
    <?php 
$length = $pizza1->getLength();
$width = $pizza1->getWidth();
$height = $pizza1->getHeight();
$weight = $pizza1->getWeight();
$volume = $pizza1->volume();
$cost = $pizza1->costToShip();
echo "<h3>Your Dimensions are</h3>";
echo "<ul>";
echo "<li>{$length}</li>";
echo "<li>{$width}</li>";
echo "<li>{$height}</li>";
echo "<li>{$weight}</li>";
echo "<h3>Your Pizza Box Volume is:</h3>";
echo "<li>{$volume}</li>";
echo "<h3>Your total cost is:</h3>";
echo "<li>{$cost}</li>";