Question: Please answer all the question. QUESTION 3 Figure 3 shows User A, Ramly is accessing a website, 'www.123.com'. The user would like to set his

 Please answer all the question. QUESTION 3 Figure 3 shows User

Please answer all the question.

QUESTION 3 Figure 3 shows User A, Ramly is accessing a website, 'www.123.com'. The user would like to set his background to a green color and the language as Malay Language every time browsing the website. However, the cookie setting has a limitation of time, it will be expired after 7 days. At the same time the website is providing a session to store and pass information from a login page to another page temporarily. Session ID User Request + cookies Session Response + cookies User A www.123.com Figure 3: PHP connection a. Write a PHP code to set time limitation of cookie to 7 days only. (2.5 marks) b. Write a PHP code to check if the cookie is already set for User A. (2.5 marks) c. Write a PHP code to create session variables. (2.5 marks) d. Write a PHP code to access session variables in another page. (2.5 marks)

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!