CS Practical
CS Practical
(UNIVERSITY OF DELHI)
2022-2025/26
(Generic elective)
Advanced web programming
Practical File
Question 2: Create a web page containing two text boxes and a button named “Evaluate”. When the
user enters numbers in the text boxes and clicks on the “Evaluate” button, a function should evaluate
the sum of the numbers and display the result.
Question 3: Write a PHP script to perform following string operations using in-built functions and
built an interactive web page having buttons for each of the following operation:
d. Remove whitespace and other predefined characters from both sides of a string.
e. Check if a value is a string f. Convert the first character of each word in a string into uppercase.
Question 4: Design a Login form and validate that form using PHP code. Display error message box
when data is not valid otherwise redirect to the next page and display “Welcome username!”.
Question 5: Design a student registration form, using appropriate input fields consisting of following:
a. First Name
b. Last Name
c. Gender
d. Roll Number
e. Phone Number
f. Course Submit
Write PHP Code to make connection to MySql database, create database and tables and perform
insertion, deletion, and retrieval of the data (Using SQL operations like JOIN, ORDER BY, GROUP BY)
Display the messages such as “The record is added in the database!” when data is inserted into the
database, “A record is deleted from the database” when data is deleted from the database. Use
appropriate button names such as Add Data, Delete Data, and Display Data.
Question 7
1. Change text color and contents using button click events using jQuery
2. Select elements using ID, class, elements name, attribute name
3. Run code on click events in jQuery