echo print_r($order, TRUE); } if (strtolower($_POST["meal"]) == "italian") { $order = new Lunch(20, 'Italian', 'Tiramisu'); echo print_r($order, TRUE); } } if (isset($_POST["drink_order"])) { if (strtolower($_POST["drink_order"]) == "icecubes") { $order = new Drink(6, 'cola'); $order->makeAddition('icecubes'); echo print_r($order, TRUE); } else { if (strtolower($_POST["drink_order"]) == "lemon") { $order = new Drink(6, 'cola'); $order->makeAddition('lemon'); echo print_r($order, TRUE); } else { $order = new Drink(3, 'cola'); echo print_r($order, TRUE); echo "<p>You haven't ordered icecubes or lemon</p><br>"; } } } if (isset($_POST["answer"])) { if ($_POST["answer"] == "lunch") { echo "<p>From which cuisine you want your lunch?'Polish', 'Mexican', 'Italian?'</p><br>"; echo "<form action='' method='post'>" . "<input type='text' name='meal'>" . "<input type='submit'></form>"; } if ($_POST["answer"] == "drink") { echo "<p>Do you want additional 'icecubes' or 'lemon' for your drink?</p><br>";