Assignment 6: Forms

Assignment 5: Forms


Practice Questions


Q.1: To design an application that works as a simple calculator using PHP. (use isset())



Q.2: Write a PHP script to check PAN number entered by the customer is valid or not and display an appropriate message.



Q.3: Write a PHP script to check mobile number entered by the user is valid or not and display an appropriate message.



Set A


Q.1: Write a PHP script to accept font name, background color, and welcome message on 1st page. Display the welcome message with the given font and background color on the next page.



Q.2: Write a PHP program to accept name, address, pin code, gender information. If any field is blank display error messages “all fields are required”.



Q.3: Write a PHP script to accept employee details (number, name, address) on the first page. On the second page accept earning (basic, DA, HRA), and on the third page display employee details in the proper format.



Set B


Q.1: Write a PHP script to accept customer name and the list of product and quantity on the first page. On the next page display the name of the customer, name of the products, rate of the product, quantity, and total price in table format.



Q.2: Write HTML code to design multiple choice question paper for PHP subject. Display question-wise marks and total marks received by the student in table format.



Q.3: Write a PHP script to accept student name and list of programming languages (using a drop-down box) and display it on the next page in the proper format.



Q.4: Write a PHP script to accept user name, email address and age. If data entered by the user is valid then display it on the next page otherwise display the appropriate message(use filter_var()).



Set C


Q.1: A web application that takes name and age from an HTML page. If the age is less than 18, it should send a page with "Hello <name>, you are not authorized to visit the site" message, where <name> should be replaced with the entered name. Otherwise, it should send a "Welcome <name> to this site" message.