DSC-M-BCA-355P - MINOR - Web Application Development Using PHP
DSC-M-BCA-355P - MINOR - Web Application Development Using PHP
Credits: 4
Course Outcomes:
Prerequisites:
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
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.
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”.
Textbook:
Reference Books:
https://www.w3schools.com/php/
http://www.learn-php.org/
https://www.tutorialspoint.com/php/
Required Softwares:
1. Notepad++
2. XAMPP or WAMP server