Question: Q3 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
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 A Request + cookies W Response cookies Session ID User A www.123.com Figure 3: PHP connection 2. Write a PHP code to set time limitation of cookie to 7 days only. (2.5 marks) bWrite 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
Get step-by-step solutions from verified subject matter experts
