Cookies Programming Tasks for Practice

You must first well understand basics of cookies. Then do following tasks to improve your understanding and coding skill related to using cookies in web applications using PHP:

Make interval.php that saves a cookie in user internet browser with current time. When user access the page again, show the duration in seconds after which the page is opened.

Make a form with two input text fields. First for cookie name and other for cookie value, when user submit the form. Create new cookie with given name and value in user browser.

Make a form with one input text field and Delete Cookie button, when user submit the form, delete only the cookies whose name is submitted from form. Handle form using Postback mechanism.

Make show-all-cookies.php page, it should display all cookies the application has stored in user browser. Code must be dynamic, means it shall work for keys stored in browser. Do not fix the keys.

Cookies control-panel.php. User shall use it to view and update cookies values. You need to make dynamic form. For example, if there were 5 cokies, you shall show a from with 5 text fields containing cookie value. The label shall be cookie key. At the end, add Update button. When button is clicked the cookies values shall be updated in user browser (via server).


    Popular posts from this blog

    Task 12 - Create Java Program with MySQL Database Connectivity

    Java Interfaces and Exception Handling - Practice Problem with Solution

    Task 16 - Javafx Program to Create, Retrieve, Update and Delete records with Database