Assignment 6 : Php Session and Cookies Practice

Assignment 6:Session and Cookies


Practice Questions


Q.1 : A web application that lists all cookies stored in the browser on clicking “list cookies” button, add cookies if necessary.



Q.2 : Write a PHP program to store the current date-time in a COOKIE and display the ‘Last visited on’ date-time on the web page upon reopening of the same page.



Q.3 : Write a script to keep track of a number of times the web page has been accessed using the session.



Set A


Q.1 : Write PHP program to store student information like Seat number, name, and class. On the second page, accept marks of the subject PHP, DS, CPP, and RDBMS. Display Result in table format on the third page (use cookies).


Q.2 : Write a PHP script to accept username and password. If in the first three chances, username and password entered is correct, then display the welcome message on the second form, otherwise display an error message.


Q.3 : Write a PHP script to accept font style, font size, font color, background color using a cookie. Display selected values on the next second page and actual implementation on the third web page.


Set B


Q.1 : Create an online flight registration form. On the first page accept name, address, birthdate, and mobile number. On the second page accept flight details (flight name, source, destination, departure date-time and charges). If the user doesn’t enter information within a specified time limit, expire his session and give a warning otherwise display details using sessions on the third page.



Q.2 : Create a form to accept patient details like name, address, birthdate, and mobile number. Once the Patient information is accepted, and then accepts health details like medicare number, health fund and critical information. Display patient details and health details on the next form.



Q.3 : Write a PHP script to create an inventory management system. On the first page accept the highest sold product details like product name, total quantity and total sold. On the second page accept the latest sales details like product name, date and total sale. Display highest sold product details in one table and latest sales details in another table on the third page.



Set C


Q.1 : Write a PHP script to create an online shopping form. On the first page accept customer name, email address, shipping address, mode of payment. Design the Second page as given below. And the third page should display a bill, which consists of customer details and purchase details in the proper format.