0% found this document useful (0 votes)
29 views1 page

Web Programming Assignment 2

Assignment

Uploaded by

hussainmalaika36
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)
29 views1 page

Web Programming Assignment 2

Assignment

Uploaded by

hussainmalaika36
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
You are on page 1/ 1

Khwaja Fareed

University of Engineering & Information Technology


Rahim Yar Khan

Institute of Computer Science


Program: BS Computer Science
Fall 2024
Assignment 2

[Course Code] [COSC-2140] Course Instructor: Shahzad Hussain


Course Name: Web Programming
Total Marks: 10 Weightage: 5
Deadline:

Note: Dear students, please complete this assignment within due data and time. No
assignment will accept after the due date and time and upload the assignment on the LMS.

1. Write a PHP script to calculate and display the result of adding, subtracting, multiplying, and dividing
two variables ($num1 = 20, $num2 = 10). (02)

2. Create an HTML form with fields for Name, Email, and Age. Write a PHP script to: (03)
• Validate the input to ensure all fields are filled.
• Display an error message if validation fails.
• Show the entered data on the same page if validation is successful.

3. Create a dynamic PHP webpage that: (03)


Displays the current date and time in the format:
Today is: Wednesday, December 25, 2024, Time: 4:30 PM.
Uses an associative array to store the names and marks of 5 students. Display this data in an HTML
table and highlight rows where marks are greater than 80.

You might also like