0% found this document useful (0 votes)
53 views2 pages

PHP Web Development Lab Tasks

The document outlines a PHP assessment for a Web Development Lab course, detailing six tasks that involve creating HTML forms and writing PHP code to perform various calculations and display results. Tasks include calculating the Body Adiposity Index, generating invoices with discounts, computing employee salaries, determining sales commissions, assessing medical conditions based on body temperature, and evaluating diabetic conditions based on sugar test readings. Each task requires specific input fields and output formatting using HTML and PHP.

Uploaded by

Sharan Sha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views2 pages

PHP Web Development Lab Tasks

The document outlines a PHP assessment for a Web Development Lab course, detailing six tasks that involve creating HTML forms and writing PHP code to perform various calculations and display results. Tasks include calculating the Body Adiposity Index, generating invoices with discounts, computing employee salaries, determining sales commissions, assessing medical conditions based on body temperature, and evaluating diabetic conditions based on sugar test readings. Each task requires specific input fields and output formatting using HTML and PHP.

Uploaded by

Sharan Sha
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

School of Computer Science Engineering and Information Systems

Winter Semester 2024-25


UBCA204P – Web development Lab
L39+L40 Lab
PHP Assessment
Time : 60 Minutes Mark : 10
1. Design a simple HTML form where user can input Name, Hip
Circumference (in cms), and height (in centimeter). Write the PHP code
perform the following and display the output in any one of the HTML
tag with your choice.
a. Convert the value height in meter.
b. Calculate the Body Adiposity Index using given formula.
BAI = (Hip Circumference (cm) / (Height (m))^1.5) - 18.
c. Using BAI, find the relevant observation.
• Minimal Anxiety: Scores between 0 and 7.
• Mild Anxiety: Scores between 8 and 15.
• Moderate Anxiety: Scores between 16 and 25.
• Severe Anxiety: Scores between 26 and 63.
2. Design an Invoice form which contains Item No, Item description,
Quantity of the item being purchased, Price per Item. Using PHP code
to perform the following.
a. Calculate the cost of the item.
b. If the user purchased more than 25 quantity of Item, 10% discount
will be given from the total cost of the Item.
c. Display the Item No, Item description, Quantity of the Item being
purchased, Price pe Item, Discount, Actual cost in separate header 1
tag with style of your choice.
3. Design a pay slip HTML form which contains name of the employee,
number of working hours, and hourly rate and submit button. Write a
PHP code to achieve the following.
a. The company pays as per the hourly rate if the employee working
hours <=50.
b. The company will pays doubly hour rate for extra number of hours
(ie exceed 50 hrs)
c. Display all the details( the name, number of hours, hourly rate,
gross salary ) in tabular format.
a. Calculate the gross of each employee and find the total salary
amount spent by the company for all the employees.
b. Display all the details of employees using any html with style of
your choice.
4. A large company pays its salespeople on a commission basis. The
salespeople each receive $200 per week plus 9% of their gross sales for
that week. For example, a salesperson who sells $5000 worth of
chemicals in a week receives $200 plus 9% of $5000, or a total of $650.
Design an Earning form which contains Name of the sales person,
Number of products sold through form. Write a PHP code to find total
earning of the sales person and display the output in any one of the
HTML tag.
5. Design a medical care form which contains name of the person, age,
body tempt (in celsius). Write a PHP to perform the following.
a. Convert body tempt celsius into Fahrenheit
F =( C *9/5) + 32
b. Based on the body tempt identify the severity of the person.
Range of 99.1 – 100.5F = Person affected with viral infections.
Range of 100.6-102.2F = Person affected with pneumonia.
Range of 102.3 – 105.8F= Person affected with Hyperpyrexia.
Rangle of 97.5 – 98.9 F = Normal
c. Display name of the person, age, body tempt (in Fahrenheit),
condition of the person in any one of the HTML tag.
6. Design a form which contains name of the person, age and random
sugar test reading values. Write a PHP code to find the diabetic
condition of the patient using following constraints and display the
result in any one of the html tag with style of your choice.
a. Below 140 mg/dL, the person is treated as normal.
b. Range of 140 to 199 mg/dl, the person is treated as prediabetic
patient.
c. Above or equal 200 mg/dl, the person is treated as diabetic patient.

You might also like