Answered step by step
Verified Expert Solution
Question
1 Approved Answer
PHP code given for exercise-2 : Exercise 2 First Form Favourite Colour: PHP code given for exercise-2a: Exercise 2a Second Form Favourite Colour: PHP code
PHP code given for exercise-2 :
First Form
PHP code given for exercise-2a:
Second Form
PHP code given for exercise-2b:
Results
Session Data
POST Data
You have been given the files exercise-2.php, exercise-2a.php and exercise-2b.php. Two of these files contain a HTML form with a single input textbox field and submit button. Your task is to save the data entered to a session variable, then progress to exercise-2a.php, allow the user to enter in more data and then echo that data on exercise-2b.php For the first form, data sent via the POST method must be saved within a session variable. For the second form, the data is not to be saved within session and retrieved only from the POST variable in exercise- 2b.php. If the user arrives at exercise-2b.php without the session variable holding data the user is sent back to exercise-2.php and the session is destroyed and the process starts again. The sequence of actions is: exercise-2.php submits to exercise-2a.php, and exercise-2a.php submits to exercise-2b.php. exercise-2b.php displays the session data from exercise-2.php and the form (POST) data from exercise-2a.phpStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started