0% found this document useful (0 votes)
13 views6 pages

DSC-M-BCA-355P - MINOR - Web Application Development Using PHP

The course 'Web Application Development using PHP' aims to familiarize students with PHP, MySQL, and AJAX for server-side web development. It covers basic to advanced PHP concepts, database operations, and AJAX integration, along with practical programming assignments. Upon completion, students will be able to develop dynamic web applications and utilize AJAX for efficient client-server communication.
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)
13 views6 pages

DSC-M-BCA-355P - MINOR - Web Application Development Using PHP

The course 'Web Application Development using PHP' aims to familiarize students with PHP, MySQL, and AJAX for server-side web development. It covers basic to advanced PHP concepts, database operations, and AJAX integration, along with practical programming assignments. Upon completion, students will be able to develop dynamic web applications and utilize AJAX for efficient client-server communication.
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/ 6

Course Name: Web Application Development using PHP

Course Code: DSC-M-BCA-354 P

Credits: 4

Course Outcomes:

The aim of this course is to enable students to


 Get familiar with server-side language for web development.
 Learn basic concepts of PHP, functions for database operations using
MySQL.
 Learn about AJAX in PHP for faster processing of web applications.
 Get familiar with validations.

Prerequisites:

 Basic knowledge of data types, HTML tags.

Unit-1 Introduction to PHP

Introduction: Basic PHP syntax, PHP comments, data types in PHP,PHP variables,
Echo and print statement, PHP strings(functions), PHP math functions, PHP
operators, PHP if…else statements, switch case, Loop (While, do while , for, for
each), PHP functions , PHP arrays( Indexed, Associative, multidimensional), PHP
form handling

Unit-2 Advanced PHP

MYSQL database, MySQL connect, Create database, create table, Insert data,
Select data, Update data, Delete data, Display data, AJAX introduction, PHP and
AJAX, Methods and properties of XMLHttpRequest object, Concept of Cookie and
Session in PHP
Unit Particulars Hours Credits
1 Basic Programs 30 1
1 Write a PHP program to check whether the number entered is
Positive / Negative or Zero entered by user
2. Write a PHP program to find maximum number from the two
numbers entered by user
3. Write a PHP program that prints Fibonacci series till the number
entered by user.
4. Accept a string from user. Write PHP program to check whether
that entered string is palindrome or not.
5. Write a PHP program to accept a number from user and find its
square and cube.
6. Write a PHP program to find sum of n numbers. Take input from
user.
7. Accept a two numbers from user. Write a PHP program to Add,
Subtract and Multiply the numbers and displays result.
8. Accept a number from user as “Radius” of a circle. Write PHP
program find Area of a Circle.
( Area = PI * radius * radius).
9. Write a PHP program to print all even numbers till the entered
number.
10. Create a function that accepts 3 numbers as parameters and check
whether the sum of 3 numbers is prime or not. Note: Input should
be collected from user using an HTML page.
11. Create a function that accepts a number as argument and displays
sum of digit of a number. E.g. If Number is 123 then sum of Digits
is 6 i.e., 1+2+3 =6 Note: Input should be collected from user using
an HTML page.
12. Write a PHP program that changes color of the web page using
switch case.

2. Session, Cookies, Arrays, Functions 30 1


1. Write a PHP script to set a cookie named "username" with the
value "Welcome" with an expiration time of one hour and
display its value.
2. Write a PHP script to delete a cookie named "welcome".
3. Write a PHP script to retrieve and display the value of the
session variable "loginid".
4. Write a PHP script to check if a cookie named "visited" exists. If
it does, display a welcome message; otherwise, display a
default message.
5. Create an array with 5 elements and print all array elements.
6. Create an array with 5 elements. Find and display minimum and
maximum value from the array.
7. Write a PHP program that deletes duplicate values from array.
8. Write a PHP program that checks whether the element is exists
in the array or not. Give acknowledgement from the same.
9. Create an associative array and display its elements.
10. Create an array named $sub, assign five elements to it and
display the elements assigned using for loop and foreach
statement
11. Create an array named $student that stores 5 elements
bounded to different keys and access the same using the key
element.
12. Write a program in PHP to demonstrate the use of
multidimensional arrays.
13. Write a program in PHP to sort the array of given 5 numbers in
ascending and descending order.
14. Write a program to count the total number of times a specific
value appears in an array.
15. Create two functions in PHP, parameterized and non
parameterized for implementing string concatenation
operation.

3. MySQL 30 1
1. Write a PHP script for that creates a database named "DB-1"in
MySQL. And also create a table “myTable” in above created
database “DB-1”.
2. Write a PHP script for creating a “Product” table in “MyDB”
database with fields Pro_id, Pro_name, Pro_price, Qty, Rate .
Also display an acknowledgement for the same as “Table
created successfully”.
3. Create a form containing four input fields(Pro_id, Pro_name,
Pro_price, QOH) and Submit button. When the user clicks on
the submit button, PHP script should be executed which inserts
the record in the product table.
4. Create a form containing one input field (Product_id) and a
Delete button. When the user clicks on the Delete button a PHP
script should get executed and should delete the record of the
product for the Product_id specified.
5. Create a form containing two input fields (Product_id, Rate) and
Update button. When the user clicks on the Update button, the
Rate of the Product_id specified should get updated by 5% of
the current rate using a PHP script.
6. Create a form containing one input field (Product_id) and a
search button. When the user clicks on the Search button a PHP
script should get executed and should display the details of the
product for the Product_id specified.
7. Write a PHP script for creating a “Product” table in “MyDB”
database with fields Pro_id, Pro_name, Pro_price, Qty, Rate .
Also write code to update product price to 100 whose product
id is <4 in Product table”.
8. Write a PHP script for creating a “Student” table in “MyDB”
database with fields Student_id, Student_name, Course, Age,
MobileNo . Also display an acknowledgement for the same as
“Table created successfully”.

9. Write a PHP Script to update record (Stud_Address) of student


table where sid=13
10. Write a PHP Script to Delete Record of Student Table by clicking
on Delete Button by specifying Student_ID.
11. Write a PHP Program to update a record with your own value
into the
table Student against each column (Student ID, Student Name,
Course ID, and Mobile No).
Note:
(a) Input should be collected from user using an HTML page.
(b) Make Sure Student ID, Course ID, and Mobile No must not
be Negative.
(c) Student Name should not be Blank.
12. Write a PHP Script to Update Record of Employee table
(Empname, Empsalary, Empaddress) from Employee Table.
Update Employee Name to “ABC” whose Employee number is
3.
13. Write a PHP script that creates a database named
"Product_Details" in MySQL. Create an HTML form containing
four input fields (Pro_id, Pro_name, Pro_price, and QOH) And
Submit button. When the user clicks on the submit button a
PHP Script should be Executed which inserts the record in the
product table. Note: input should be collected from user using
an html page and there should not be duplicate product id in
the table.
14. Write a PHP Program to update a record with your own value
into the table Employee against each column (Employee ID,
Employee Name, Job Code, Salary and Mobile No). Note: (a)
Input should be collected from user using an HTML page. (b)
Make Sure Employee ID, Salary, and Mobile No must not be
Negative. (c) Employee Name should not be Blank. (d) Salary
length must not be greater than 5 digits.
4. AJAX and Validation 30 1
1. Create a form containing one input field (MyName). When the
user enters his/her name and press any key, the form should
display a welcome message for the user. Implement using AJAX.
2. Create a form to enter a string. Write a PHP program for
converting a string into uppercase using AJAX.
3. Create a form containing a combobox with some product
names as items. Whenever a user selects a particular product
from the combobox, that selected item should be printed on
the page. (i.e. without pressing submit button). Implement
using AJAX.
4. Create a form containing a combobox with some color names
as items. Whenever a user selects a particular color from the
combobox, that selected item should be printed on the page.
(i.e. without pressing submit button). Implement using AJAX.
5. Create a form containing a radiobutton with some product
names. Whenever a user selects a particular product from the
radiobutton, Display on the page as “You have
selected________ product”. Implement using AJAX.
6. Create a form containing one input field (Number). When the
user enters the number and as the key is released, the form
should display “whether the number is odd or even” with a
message to the user. Implement using AJAX.
7. Write a program to validate a blank field and also validate the
length of a string entered (i.e. minimum length of 5).
8. Write a program to validate and Email ID using regular
expression and by using DOM
9. Write a program to validate a username field and also validate
the length of the username entered (i.e. minimum length of 7
and maximum length of 12) using AJAX.
10. Write a PHP program to print user data using AJAX. Make one
drop down select user id and print specific user detail by
matching user id.
11. Create a form containing one input field (Number). When the
user enters the number and as the key is released, the form
should display “whether the number is greater than 50 or not”
with a message to the user. Implement using AJAX
12. Write a program that checks a particular student Id already
exists in the Student Table (Stud_id, Stu_Name, MobileNo,
Country) or not. If the entered student ID exists then display a
message that : “Student ID already exists….”. (Using AJAX)
13. Write a program that checks a particular mobile number
already exists in the student (stuId, stu_name, mob, country)
table or not. If mobile number exists then display a message
"Mobile Number Already registered. Try another Mobile
Number". If it does not exist then add the data in the student
table. Implement using AJAX.

Textbook:

Developing Web Applications in PHP and AJAX


Publisher: McGraw Hill
By B M Harwani

Reference Books:

1. Teach yourself PHP, MySQL and Apache


Publisher: Pearson
By Julie C. Meloni
2. PHP Ajax Cookbook
Publisher: PACKT Publishing

Other Web References:

https://www.w3schools.com/php/
http://www.learn-php.org/
https://www.tutorialspoint.com/php/

Required Softwares:
1. Notepad++
2. XAMPP or WAMP server

Accomplishments of the student after completing the Course:


After completion of this course Student would be able to

 To setup and configure XAMPP


 To develop server side programs using PHP in dynamic web development.
 To debug a PHP/AJAX web application.
 To use AJAX for efficient and fast communication between client and server.
---------------

You might also like