Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A web application for displaying a restaurant menu has two display states, meat and vegetarian. In the meat state, the page displays only the meat

A web application for displaying a restaurant menu has two display states, meat and vegetarian. In the meat state, the page displays only the meat-based items that are available. In the vegetarian state the page displays only the vegetarian items on the menu that are available. The display state is saved in a session variable named "menu" and the values are either "meat" or "vegetarian".
This session variable is created in another part of the application, but do not assume that it has been set correctly (i.e. test it before you use it). If the session variable is not set to either "meat" or "vegetarian" then the default is to not show any the menu items.
Write the PHP code for the file below so that the correct DOM elements are visible or invisible depending on whether the display state is meat or vegetarian. Manipulate the CSS values in the style section, not in the html section. Write the simpiest, most efficient code possible using proper programming techniques for this problem.
Part A: Add the code to use the session to determine the display state
Part B: Add the code to dynamically manipulate the meat class
Part C: Add the code to dynamically manipulate the vegetarian class

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Transactions On Large Scale Data And Knowledge Centered Systems Vi Special Issue On Database And Expert Systems Applications Lncs 7600

Authors: Abdelkader Hameurlain ,Josef Kung ,Roland Wagner ,Stephen W. Liddle ,Klaus-Dieter Schewe ,Xiaofang Zhou

2012th Edition

3642341780, 978-3642341786

More Books

Students also viewed these Databases questions