Question: 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 : Exercise 2 First Form Favourite

PHP code given for exercise-2 :

Exercise 2

First Form

PHP code given for exercise-2a:

Exercise 2a

Second Form

PHP code given for exercise-2b:

Exercise 2a

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.php

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!