0% found this document useful (0 votes)
323 views

Web Based Application Development Using PHP 120421 1 PDF

Uploaded by

Raj Debadwar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
323 views

Web Based Application Development Using PHP 120421 1 PDF

Uploaded by

Raj Debadwar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 162

lOMoARcPSD|22614209

22619 Web based application development using PHP


120421 (1) (pdf
Computer Engineering (Savitribai Phule Pune University)

Scan to open on Studocu

Studocu is not sponsored or endorsed by any college or university


Downloaded by Raj Debadwar ([email protected])
lOMoARcPSD|22614209

A Laboratory Manual For

Web Based Application


Development with PHP

(22619)
Semester –VI

Maharashtra State
Board of Technical Education, Mumbai
(Autonomous) (ISO 9001 : 2015) (lSO/IEC 27001 : 2013)

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Maharashtra State Board of Technical


Education, (Autonomous) (ISO 9001 : 2008)
(lSO/IEC 27001 : 2005)
4th Floor, Government Polytechnic Building, 49, Kherwadi, Bandra ( East ), Mumbai
400051.
(Printed on June, 2019)

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE
BOARD OF TECHNICAL EDUCATION

Certificate
This is to certify that Mr. / Ms:………………………………...................................

Roll No................................................., of Sixth Semester of Diploma in

…………………..……………………………………………………… of Institute

………………………………………………………………………………………

(Code:…………........) has attained predefined practical outcomes (PROs)

satisfactorily in course Web Based Application Development with PHP (22619)

for the academic year 20……….. To 20…….…… as prescribed in curriculum.

Place:…………………… Enrollment No:…………………………

Date: …………………….. Exam. Seat No:………………………...

Subject Teacher Head of Department Principal

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Practical -Course Outcome Matrix

Course Outcomes(COs)
a. Develop program using control statement
b. Perform operation based on arrays and graphics
c. Develop programs by applying various object oriented concepts. d. Use form controls with validation t
e. Perform database operations in PHP.

Sr. No.
Title of the Practical
a. Install and configure PHP, web server, MYSQL b. Wr
01 c. Write a simple PHP program using expressions and op

Write a PHP program to demonstrate the use of Decision


a. If statement
02 b. If-else statement c. Switch statement

Write a PHP program to demonstrate the use of Looping


a) While statement
b) Do-while statement c) For statement
03
d) Foreach statement

Write a PHP program for creating and manipulating-a) In


b) Associative array
04
c) Multidimensional array

A. Write a PHP program to-• Calculate length of string.


• Count the number of words in string without using strin
05 B. Write a simple PHP program to demonstrate use of va

Write a simple PHP program to demonstrate use of simp


06
Write a simple PHP program to create PDF document bu

07

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Write a PHP program to


08 a) Inherit members of super class in subclass.
b) Create constructor to initialize object of class by using

Write a simple PHP program on Introspection and Serial


09
Design a web page using following form controls:
10
a. Text box, b. Radio button, c. Check box, d. Buttons
11 Design a web page using following form controls: a. Lis

12 Develop web page with data validation.


Write simple PHP program to -a. Set cookies and read it.
13 b. Demonstrate session management

Write a PHP program for sending and receiving plain tex


14
Develop a simple application to -a) Enter data into database
15 b) Retrieve and present data from database

Develop a simple application to Update, Delete table data


16

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Content Page
List of Practicals and Progressive Assessment Sheet
Sr. No.

Practical Outcome

a. Install and configure PHP, web server, MYSQL


b. Write a program to print “Welcome to PHP”
c. Write a simple PHP program using expressions and operators.

Write a PHP program to demonstrate the use of Decision making control stru
a. If statement
b. If-else statement c. Switch statement

2
Write a PHP program to demonstrate the use of Looping structures using-a) W
b) Do-while statement c) For statement
d) Foreach statement

3
Write a PHP program for creating and manipulating-
a) Indexed array
b) Associative array
c) Multidimensional array
4

A. Write a PHP program to-• Calculate length of string.


• Count the number of words in string without using string functions.
B. Write a simple PHP program to demonstrate use of various built-in string fu

Write a simple PHP program to demonstrate use of simple function and parameter

Write a simple PHP program to create PDF document buy using graphics concepts

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Sr . N o.
Title of The Pratical

Write a PHP program to


a) Inherit members of super class in subclass.
8 b) Create constructor to initialize object of class by using object oriented concepts.

Write a simple PHP program on Introspection and Serialization.


9
Design a web page using following form controls:
a. Text box, b. Radio button, c. Check box, d. Buttons
10

Write a PHP program for sending and receiving plain text message (e-mail).
11

Develop web page with data validation.


12
Write simple PHP program to -a. Set cookies and read it.
13 b. Demonstrate session management

Write a PHP program for sending and receiving plain text message (e-mail).
14

Develop a simple application to -a) Enter data into database


b) Retrieve and present data from database
15

Develop a simple application to Update, Delete table data from database.


16

Total Marks

Total Marks (Scaled to 25 Marks)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 0

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Practical No. 1:

a. Install and configure PHP, web server, MYSQL


b. Write a program to print “Welcome to PHP”
c. Write a simple PHP program using expressions and operators.

I Practical Significance:

PHP is popular scripting language, which is used to develop various web


applications. PHP is also object oriented programming language students will be able
to setup
PHP environment for executing PHP program or using different server like WAMP
or XAMPP server.
II Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written
form. III Competency and Practical skills:

“Develop application using PHP”


This practical is expected to develop the following skills.
1. Setup PHP environment for executing PHP program.
2. Execute simple program.
IV Relevant Course Outcome(s):

CO1 Develop a program using control statement.


V Practical Outcome (PrOs) :

1. Install and configure PHP, web server, MYSQL


2. Write a program to print “Welcome to PHP”
3. Write a simple PHP program using expressions and operators

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 1

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.
VII Minimum Theoretical Background:

PHP program is executed on web server.


Install XAMPP server on Windows 7 or above.

Step1:

Open the XAMPP website. Go to https://www.apachefriends.org/index.html in your


computer's web browser.

Step2:
Click XAMPP for Windows. It's a grey button near the bottom of the page. Depending on
your browser, you may first have to select a save location or verify the download.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 2

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Step3:
Double-click the downloaded file. This file should be named something like xampp-win32-
7.2.4-0-VC15-installer, and you'll find it in the default downloads location (e.g., the
"Downloads" folder or the desktop).

Step 4
Click Yes when prompted. This will open the XAMPP setup window. You may have to click OK
on a warning if you have User Account Control (UAC) activated on your computer.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 3

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Step 5:
Click Next. It's at the bottom of the setup window.

Step 6:
Select aspects of XAMPP to install. Review the list of XAMPP attributes on the left side of
the window; if you see an attribute that you don't want to install as part of XAMPP, uncheck its
box. By default, all attributes are included in your XAMPP installation.

Step7: Click Next. It's at the bottom of the window.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 4

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Step 8:
Select an installation location. Click the folder-shaped icon to the right of the current
installation destination, then click a folder on your computer. If you have the UAC
activated on your computer, avoid installing XAMPP in your hard drive's folder (e.g., OS
(C:)). You can select a folder (e.g., Desktop) and then click Make New Folder to create a new
folder and select it as the installation destination.

Step 9: Click OK. Doing so confirms your selected folder as your XAMPP installation location.

Step 10: Click Next. It's at the bottom of the window.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 5

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Step11:
Uncheck the "Learn more about Bitnami" box, then click Next. The "Learn more about
Bitnami" box is in the middle of the page.

Step 12:
Begin installing XAMPP. Click Next at the bottom of the window to do so. XAMPP will
begin installing its files into the folder that you selected.

Step 13:
Click Finish when prompted. It's at the bottom of the XAMPP window. Doing so will close
the window and open the XAMPP Control Panel, which is where you'll access your servers.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 6

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Step 14:
Select a language. Check the box next to the American flag for English, or check the box next
to the German flag for German.

Step 15:
Click Save. Doing so opens the main Control Panel page.

Step 16: Start XAMPP from its installation point. If you need to open the XAMPP Control
Panel in the future, you can do so by opening the folder in which you installed XAMPP, right-
clicking the orange-and-white xampp-control icon, clicking Run as administrator, and clicking
Yes when prompted. When you do this, you'll see red X marks to the left of each server
type (e.g., "Apache"). Clicking one of these will prompt you to click Yes if you want to
install the server type's software on your computer.
Counter intuitively, double-clicking the xampp_start icon doesn't start XAMPP.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 7

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Step 17:
Resolve issues with Apache refusing to run. On some Windows 10 computers, Apache won't
run due to a "blocked port". This can happen for a couple of reasons, but there's a relatively easy
fix: Click Config to the right of the "Apache" heading.
Click Apache (httpd.conf) in the menu.
Scroll down to the "Listen 80" section (you can press Ctrl+F and type in listen 80 to find
it faster).
Replace 80 with any open port (e.g., 81 or 9080).
Press Ctrl+S to save the changes, then exit the text editor.

Restart XAMPP by clicking Quit and then re-opening it in administrator mode from its folder.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 8

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Step 18:
Click on Start button of (Apache Server, PHP, and MySql). Now Web server is ready to execute
PHP and MySql program.

B: Write a program to print “Welcome to PHP”

Program:

<?php

echo(“<h1><b>Welcome to PHP</b></h1> ”);

?>

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 9

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Output screen:

C: Write a simple PHP program using expressions and operators.

Operators in PHP

PHP Arithmetic Operators


Operator
+
-
*
/
%
**

PHP Assignment Operators


Assignment
x=y

x += y
x -= y
x *= y
x /= y
x %= y

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 10

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

PHP Increment / Decrement Operators


Operator Name
++$x Pre-incremen
$x++ Post-incremen
- -$x Pre-decremen
$x-- Post-decreme

PHP Comparison Operators


Operator Na
== Eq

=== Ide

!= No
<> No

!== No

> Gr

< Les
>= Gr

<= Les

<=> Spa

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 11

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


PHP Logical Operators
Operator
And
Or
Xor
&&
||
!

PHP String Operators


Operator
.

.=

PHP Array Operators


Operator Name
+ Union
== Equality

=== Identity

!= Inequalit

PHP Conditional Assignment Operators

Operator Name

?: Ternary

Null coalescing
??

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 12

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Sample Program

<html>

<body>

<center>

<h1>

<b>

<?php

$x = 10;

$y = 6;

echo("<br>The value of x=".$x);

echo("<br>The value of y=".$y);

echo("<br>Addition is ".($x + $y));

?>

</b>

</h1>

</body>

</html>

Output Screen.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 13

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

VII. Resources Required:

Name of Resources
Sr. no.
Hardware: Computer System
1

Operating System
2
3 Software

IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Practical Related Questions.

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. How to execute PHP program.( Steps)


2. What are the different operators supported by PHP with example? (any TWO
types) (Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 14

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Exercise

1. Write a various comparison operators in PHP with


example. 2. Write a various Logical operators in PHP with
example.

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 15

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 16

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Practical No: 02
Write a PHP program to demonstrate the use of Decision making control structures using-
a. If statement
b. If-else statement
c. Switch statement

I Practical Significance:

In computer science, conditional statements, expressions and constructs are perform


different computations or actions depending on whether Boolean condition evaluates to
true or false. Students will be able to use various forms of if statements to check the condition.
II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


This practical is expected to develop the following skills.
Write a program to use simple if statements to check conditions
Develop a program to use different forms of if to check multiple condition
Write a program to using switch statement.

IV Relevant Course Outcome(s):

CO1 Develop a program using control statement.


V Practical Outcome (PrOs) :

Write a program to use simple if statements to check conditions.


Develop a program to use different forms of if to check multiple conditions.

Write a program to using switch statement.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 17

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.
VII Minimum Theoretical Background:

Controls statements are used to control are used to control the flow of execution of program based
on certain conditions. These are used to cause the flow of execution to advance and branch
based on changes to the state of program.

1. if statement
2. if-else statement
3. If..elseif..else statement
1. if: if statement is simple decision making statement. It is used to decide whether a certain
statement or block of statements will be executed or not. i.e. if a certain condition is true then the
block will be executed otherwise not.
Syntax:

if(condition)

//Statement to execute if the condition is true.

2. if-else statement: The if statement alone tells us that if a condition is true it will execute a
block of statements and if the condition false, else block will be executed.
if( condition)

//Statement to execute if the condition is true

else

//Statement to execute if the condition is false

}
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 18

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

3. switch statement
The switch statement is used to perform different actions based on different conditions. Use the switch
statement to select one of many blocks of code to be executed.

switch(n)

{
case label1:
//code to be executed if n=label1;
break;
case label2:
//code to be executed if n=label2;
break;
case label3:
//code to be executed if n=label3;
break;
...
default:
//code to be executed if n is different from all
labels; }

VII. Resources Required

Nill

IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 19

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

Write a program to find given number is even or odd.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 20

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. List operators used in if conditional statement.


2. In if-else construct which part will be executed if condition is true.
3. State the condition when the else part will be executed with example.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 21

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Exercise

1. Write a program to make the use of logical


operators. 2. Write a program to check no is positive or
negative. 3. Write a calendar program using switch
statement.
(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 22

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 23

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 24

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Practical No: 03

Write a PHP program to demonstrate the use of Looping structures using-


a) While statement
b) Do-while statement
c) For statement
d) Foreach statement

I Practical Significance:

Loop is used in programming to repeat a specific block of code until certain condition is
true. Students will be able to use while and do-while loop to replace the repetition of statements.
II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


This practical is expected to develop the following
skills. 1. Develop a program to using for loop.
2. Develop a program to using foreach loop.
3. Develop a program to using while and do-while loop.

IV Relevant Course Outcome(s):

CO1 Develop a program using control statement.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 25

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619) V


Practical Outcome (PrOs) :

1. Develop a program to using for loop.


2. Develop a program to using foreach loop.
3. Develop a program to using while and do-while loop

VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.
VII Minimum Theoretical Background:

1. While loop
while (condition is true)

{
//code to be executed;
}

2. Do..While loop
do

//code to be executed;

} while (condition is true);

3. For loop
for (init counter; test counter; increment counter)

{
//code to be executed for each iteration;
}

4.
VII. Resources Required

Nill

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 26

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

Write a program to print first 30 even numbers. (Using for, while, do..while)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 27

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. When for loop will be terminated?


2. Difference between for and for-each loop
(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 28

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

XI. Exercise

1. Write any program using if condition with for loop.


2. Write a program to display pyramids of star/patterns using
increment/decrement. (Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 29

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 30

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 31

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Practical No: 04

Write a PHP program for creating and manipulating-


a) Indexed array
b) Associative array
c) Multidimensional array

I Practical Significance:

Array in PHP is a type of data structure that allows us to store multiple elements of similar
data types under a single variable thereby saving us the effort of creating a different variable for every
data.

II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


Write a PHP program for creating and
manipulating-a. Indexed array
b. Associative array
c. Multidimensional array
IV Relevant Course Outcome(s):

CO2 : Perform operations based on arrays and graphics.

V Practical Outcome (PrOs) :

1. Develop a program to using Indexed array.


2. Develop a program to using Associative array.
3. Develop a program to using Multidimensional array.

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 32

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.
VII Minimum Theoretical Background:

There are basically three types of arrays in PHP:

Indexed or Numeric Arrays: An array with a numeric index where values are stored linearly.

Associative Arrays: An array with a string index where instead of linear storage, each value can be
assigned a specific key.

Multidimensional Arrays: An array which contains single or multiple array within it and can
be accessed via multiple indices.

Indexed or Numeric Arrays:

These type of arrays can be used to store any type of elements, but an index is always a number.
By default, the index starts at zero.

$cars = array(“Volvo”,”BMW”,”Toyota”);

OR

The index can be assigned manually:

$cars[0] = “Volvo”;

$cars[1] = “BMW”;

$cars[2] = “Toyota”;

The following example creates an indexed array name $cars, assigns three elements to it, and
then prints a text containing the array values:

<?php
$cars= array("Volvo", "BMW", "Toyota");
echo "I like " . $cars[0] . ", " . $cars[1] . " and " . $cars[2] . ".";
?>

Loop Through an Indexed Array

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 33

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


To loop through and print all the values of an indexed array, you could use loop, like this:

<?php
$cars= array("Volvo", "BMW", "Toyota");
$arrlength=count($cars);

for($x= 0;$x<$arrlength;$x++)

{
echo $cars[$x];
echo "<br>";
}
?>

Associative arrays:

Associative arrays are arrays that use named keys that you assign to them.

There are two ways to create an associative array:

$total = array(“fyif”=> “58”, “syif” => “61”, “tyif”=> “46”);

OR

$total[‘fyif’]= “58”;

$total[‘syif’]= “61”;

$total[‘tyif’]= “46”;

The named keys can then be used in a script

<html>

<body>

<?php

$total = array("fyif"=>"58", "syif"=>"58", "tyif"=>"46");

echo "Total student in TYIF:".$total['tyif'];

?>

</body>

</html>

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 34

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Loop Through an Associative Array

To loop through and print all the values of an associative array, you could use a foreach loop,
like this:

<html>

<body>

<?php

$total = array("fyif"=>"58", "syif"=>"61", "tyif"=>"46");

foreach($total as $x => $x_value)

echo "Key=" . $x . ", Value=" . $x_value;

echo "<br>";

?>

</body>

</html>

PHP Multidimensional Array

A two-dimensional array is an array of arrays (a three-dimensional array is an array of


arrays of arrays).

Example:

$student = array

array("xyz",3401,86.45),

array("abc",3402,87.42),

array("pqr",3403,85.43),

);

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 35

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


<html>

<body>

<?php

$student = array

array("XYZ",3401,86.45),

array("ABC",3402,87.42),

array("PQR",3403,85.43),

);

echo "Student Name:".$student[0][0].": Roll No: ".$student[0][1].", Percentage:


".$student[0][2].".<br>";

echo "Student Name:".$student[1][0].": Roll No: ".$student[1][1].", Percentage:


".$student[1][2].".<br>";

echo "Student Name:".$student[2][0].": Roll No: ".$student[2][1].", Percentage:


".$student[2][2].".<br>";

?>

</body>

</html>

We can also put a for loop inside another for loop to get the elements of the $student
array:

<html>

<body>

<?php

$student = array

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 36

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


array("XYZ",3401,86.45),

array("PQR",3402,87.42),

array("ABC",3403,85.43),

);

for ($row = 0; $row < 3; $row++) {

echo "<p><b>Row number $row</b></p>";

echo "<ul>";

for ($col = 0; $col < 3; $col++) {

echo "<li>".$student[$row][$col]."</li>";

echo "</ul>";

?>

</body>

</html>

VII. Resources Required

Nill

IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 37

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

Develop a program to using Indexed array.


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 38

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. How to create an array in PHP with syntax and small example.

2. List the types of array used in PHP.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 39

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

……………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Exercise

1. Develop a program to using Associative array.


2. Develop a program to using Multidimensional
array. (Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 40

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 41

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics
XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 42

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Practical No: 05

A. Write a PHP program to-


 Calculate length of string.
 Count the number of words in string without using string functions.
B. Write a simple PHP program to demonstrate use of various built-in string functions.
I Practical Significance:

String is a sequence of characters. Students will be able to perform various operations on String
using different methods.

II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


 Write a PHP program to-
 Calculate length of string.
 Count the number of words in string without using string functions.
 Write a simple PHP program to demonstrate use of various built-in string
functions. IV Relevant Course Outcome(s):

CO2 : Perform operations based on arrays and graphics.

V Practical Outcome (PrOs) :

1. Write a PHP program to-


 Calculate length of string.
 Count the number of words in string without using string functions.
2. Write a simple PHP program to demonstrate use of various built-in string functions.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 43

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.
VII Minimum Theoretical Background:

PHP String function.

Sr. No.
PHP function

1 strlen()

2 str_word_count()

3 strrev()

4 strpos()

5 str_replace()

6 ucwords()

strtoupper()
7

8 strtolower()

9 str_repeat()

10 strcmp()

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 44

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

VII. Resources Required

Nill

IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

1. Write a PHP program to-


 Calculate length of string.
 Count the number of words in string without using string functions.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 45

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

XI. Result (Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

List string functions with syntax and small example.

Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 46

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XI. Exercise

Write a program to demonstrate PHP maths function.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 47

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 48

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Practical No: 06

Write a simple PHP program to demonstrate use of simple function and parameterized function.

I Practical Significance:

The real power of PHP comes from its functions. PHP has more than built-in functions, and in
addition you can create your own custom functions. PHP has over 1000 built-in functions that can be
called directly, from within a script, to perform a specific task.

II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


 Write a simple PHP program to demonstrate use of simple function and parameterized function.

IV Relevant Course Outcome(s):

CO2: Perform operations based on arrays and graphics.

V Practical Outcome (PrOs) :

 Write a simple PHP program to demonstrate use of simple function and parameterized
function. .

VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 49

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


VII Minimum Theoretical Background:

Functions and types.

 PHP functions are similar to other programming languages. A function is a piece of code
which takes one more input in the form of parameter and does some processing and returns a
value.
 They are built-in functions but PHP gives you option to create your own functions as well.
A function will be executed by a call to the function. You may call a function from
anywhere within a page.
 Syntax:
function function_name()
{
//body of function.
}

Function Types
1. Simple function
2. Function with parameter
3. Anonymous function.
Example of Simple function:

<html>

<body>

<?php

// Defining a PHP functions

function writeMessage()

echo “Welcome to PHP world”;

// Calling a PHP function.

writeMessage();

?>

</body>

</html>

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 50

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Example of PHP function with Parameters:

<?php

function addfunc($num1,$num2)

$num=$num1+$num2;

echo “Sum of the two numbers is ”.$sum;

addfunc(50,20);

?>

Anonymous function

Anonymous functions allow to creation of functions which have no specified name.

Example:

<?php

//Defining Anonymous function

$a=function() {

echo "Anonymous function";

};

//Calling Anonymous function

$a();

?>

VII. Resources Required

Nill

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 51

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

 Write a program to demonstrate anonymous function.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 52

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. Define anonymous function.


2. Write a syntax of anonymous function.

( Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 53

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

XI. Exercise

1. Write a program to demonstrate parameterized function.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 54

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 55

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Practical No: 07

Write a simple PHP program to create PDF document buy using graphics concepts

I Practical Significance:

PHP uses a standard code to display the pdf file in web browser. The process of displaying pdf
involves location of the PDF file on the server and it uses various types of headers to define content
composition in form of type, Disposition, Transfer-Encoding etc

II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and



basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


 Write a simple PHP program to create PDF document buy using graphics concepts

IV Relevant Course Outcome(s):

CO2: Perform operations based on arrays and graphics.

V Practical Outcome (PrOs) :

 Write a simple PHP program to create PDF document buy using graphics concepts

VI Relevant Affective domain related Outcome(s)

5. Follow safety practices.


6. Practice good housekeeping
7. Demonstrate working as a leader/ a team member.
8. Follow ethical practices.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 56

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


VII Minimum Theoretical Background:

PHP uses a standard code to display the pdf file in web browser. The process of displaying
pdf involves location of the PDF file on the server and it uses various types of headers to
define content composition in form of type, Disposition, Transfer-Encoding etc. PHP passes
the PDF files to read it on the browser. Browser either shows it or download it from local
host server then display pdf.
 Note: PHP is not actually reading the PDF file. It does not recognize File as pdf. It only
passes the PDF file to the browser to be read there. If copy the pdf file inside htdocs folder of
XAMPP then it does not need to specify the file path.
 FPDF is a PHP class which allows to generate PDF files with pure PHP, that is to say
without using the PDFlib library. F from FPDF stands for Free: you may use it for any kind
of usage and modify it to suit your needs.
 FPDF has other advantages: high level functions. Here is a list of its main features:
1. Choice of measure unit, page format and
2. margins Page header and footer management
3. Automatic page break
4. Automatic line break and text
5. justification Image support (JPEG, PNG
6. and GIF) Colors
7. Links
8. TrueType, Type1 and encoding support
9. Page compression
Example:

<?php

require('fpdf.php');

$pdf = new FPDF();

$pdf->AddPage();

$pdf->SetFont('Arial','B',16);

$pdf->Cell(40,10,'Hello World!');

$pdf->Output();

?>

Note: Before executing program download fpdf.php and put into current working directory.

Download link: htp://www.fpdf.org/

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 57

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


VII. Resources Required

IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

 Write a program to create pdf file using PHP.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 58

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. Write use of various graphics function.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 59

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

XI. References/ Suggestions for Futher Reading.

 https://www.w3schools.com/php/default.asp
 https://www.guru99.com/what-is-php-program.html
 https://www.tutorialspoint.com/php/
 https://tutorialehtml.com/en/php-tutorial-
introduction/  www.tizag.com/phpT/
 https://books.goalkicker.com/PHPBook/
 https://codecourse.com/watch/php-basics
XII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1………………………………………………………
2………………………………………………………
3………………………………………………………
4………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 60

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Practical No: 08

Write a PHP program to

a) Inherit members of super class in subclass.


b) Create constructor to initialize object of class by using object oriented
concepts. I Practical Significance:

Inheritance is a mechanism in which one class acquire property of another class. In PHP, The child
class will inherit all the public and protected properties and methods from the parent class. In addition,
it can have its own properties and methods. Constructor is special member function whose task to
initialize objects of class.

II Relevant Program Outcomes (POs)

Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to slove the
computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use the
result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies and tools
with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.
III Competency and Practical skills:

“Develop application using PHP”


 Inherit members of super class in subclass.
 Create constructor to initialize object of class by using object oriented
concepts. IV Relevant Course Outcome(s):

CO3: Develop programs by applying various object oriented concepts.

V Practical Outcome (PrOs) :

 Write a simple PHP program to demonstrate use of simple function and parameterized function.

VI Relevant Affective domain related Outcome(s)

Follow safety practices.


Practice good housekeeping
Demonstrate working as a leader/ a team member.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 61

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


VII Minimum Theoretical Background:

Inheritance:

Inheritance is mechanism of extending an existing class by inheriting class.


When we inherit one class from another we say that inherited class is a subclass and the
class who has inherits is called parent class.
 In order to declare that one class inherits the code from another class, we use the
extends keyword.
Syntax:

class Parent

// The parent’s class code.

class child extends Parent

// The class can use the parent’s class code

Example:

<?php

class Shape

public $length;

public $width;

public function_construct($length,$width)

$this->length=$length;

$this->width=$width;

}
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 62

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


class Rect extends Shape

public $height;

public function __construct($length,$width,$height)

$this->length =$length;

$this->width=$width;

$this->height=$height;

public function intro()

echo “This length is {$this->length}, the width is {$this->width}, and the height is
{$this->height}”;

$r=new Rect(10,20,30);

$->intro();

?>

Constructor:

 Constructors are special member functions for initialize variables on the newly created
object instances from a class.
 When creating a new object, it’s useful to setup certain aspects of the object at the same
time. For example, you might want to set some properties to initial values fetch some
information from a database to populate the object, or register the object in some way.
 Constructor hava two types
Default and parameterized constructor.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 63

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


Example:

class emp

private $fname;

private $lname;

public function __construct($fname,$lname)

$this->fname=$fname;

$this->lname=$lname;

public function showName()

echo “My name is”.$this->fname.” ”.$this->lname;

$sid=new emp(“Ramesh”,”Patil”);

$sid->showName();

?>

VII. Resources Required

Nill

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 64

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Program Code: Teacher must assign a separate program statement to group of 3-4 students.

 Write a program to implements multilevel


inheritance.  Write a program to implements multiple
inheritance

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 65

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such questions
so as to ensure the achievement of identified CO.

1. How to create a sub class.

2 Define inheritance and its type with diagram.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 66

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

……………………………………………………………………………………………………....

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

……………………………………………………………………………………………………....

……………………………………………………………………………………………………....

XI. Exercise

2. Write a program to demonstrate parameterized


constructor. 3. Write a program to demonstrate default
constructor.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 67

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 68

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)


XII. References/ Suggestions for Futher Reading.

8. https://www.w3schools.com/php/default.asp
9. https://www.guru99.com/what-is-php-program.html
10. https://www.tutorialspoint.com/php/
11. https://tutorialehtml.com/en/php-tutorial-
introduction/ 12. www.tizag.com/phpT/
13. https://books.goalkicker.com/PHPBook/
14. https://codecourse.com/watch/php-basics
XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


………………………………………………………
………………………………………………………
………………………………………………………
………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 69

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development with PHP (22619)

Practical No. 9:

Write a simple PHP program on Introspection and Serialization.

I Practical Significance:

PHP introspection provides useful ability to examine an


object’s characteristics. Serialization technique preserves data in a format
that can later be restored to its previous form.

II Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics,


sciences and basic engineering to solve the computer
group related problem.
 Discipline Knowledge: Apply computer programming
knowledge to solve the computer group related problems.
 Experiments and practices: Plan to perform experiments and
practices to use the result to solve the computer group related
problems.
 Engineering tools: Apply relevant Computer programming
technologies and tools with an understanding of the
limitations.
 Individual and Teamwork: Function effectively as a
leader and the team member in diverse/multidisciplinary
teams.
 Communication: Communicate effectively in oral and written form.

III Competency and Practical

skills: “Develop web page

with data validation”


This practical is expected to develop the following
skills. 1. Introspection.
2. Serialization.

IV Relevant Course Outcome(s):

CO3: Develop programs by applying various object oriented concepts.

V Practical Outcome (PrOs) :

1.
Develop program on Introspection
2.
Downloaded by Raj Debadwar ([email protected])
lOMoARcPSD|22614209

Develop program on Serialization

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 70

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


VI Relevant Affective domain related Outcome(s)

1. Work
collaboratively in team. 2.
Follow ethical practices.

VII Minimum Theoretical Background:

Introspection

Introspection is the ability of a program to examine an object’s characteristics such as object


name, class name, parent class name, method names and so
on. With introspection we can write code that operates on any class or object.

Table. Class/Object Functions

Function
get_class()
get_parent_class()

class_exists()

get_declared_classes()

is_subclass_of()

get_class_vars()

get_object_vars()

method_exists()

get_class_methods()

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 71

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


 PHP Introspection program example:

<? php

class Rectangle
{
var $dim1 = 2;
var $dim2 = 10;

function Rectangle ($dim1,$dim2)


{
$this->dim1 = $dim1;
$this->dim2 = $dim2;
}

function area()
{
return $this->dim1*$this->dim2;
}

function display ()
{
// any code to display info
}
}

$S = new Rectangle(4,2);

//get the class varibale i.e properties


$class_properties = get_class_vars ("Rectangle");

//get object properties


$object_properties = get_object_vars ($S);

//get class methods


$class_methods = get_class_methods ("Rectangle");

//get class corresponding to an object


$object_class = get_class ($S);

print_r($class_properties);

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 72

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


print_r ($object_properties);
print_r ($class_methods);
print_r($object_class);
?>

Output of above code:-

Array
(
[dim1] => 2
[dim2] => 10
)
Array
(
[dim1] => 4
[dim2] => 2
)
Array
(
[0] => Rectangle
[1] => area
[2] => display
)
Rectangle

 Serialization
Serialization of data means converting it into a string of bytes in such a way that you
can produce the original data again from the string via a process as unserialization. After
you have the ability to serialize/unserialize, you can store your serialized string anywhere
and recreate a copy of the data again when needed.

PHP offers two functions, serialize() and unserialize(), which take a value of any type
(except type resource) and encode the value into string form and decode again, respectively.

 PHP Serialization program example:

<!DOCTYPE html>
<html>
<body>

<?php
echo " <h4>Serializing the array</h4></br>";

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 73

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


$data = serialize(array("Red", "Green", "Blue"));
echo $data . "<br>";

echo " <h4>Unserialziing the array</h4></br>";


$test = unserialize($data);
var_dump($test);
?>

</body>
</html>

Output:
Serializing the array

a:3:{i:0;s:3:"Red";i:1;s:5:"Green";i:2;s:4:"Blue";}

Unserializing the array

array(3) { [0]=> string(3) "Red" [1]=> string(5) "Green" [2]=> string(4) "Blue" }

VII. Resources Required:

IX. Resources used:

Sr. no.
Name of Resources
Computer System with board specifications
1

2 Software
Any other resource used
3

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 74

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

X. Practical Related Questions.

Note: Below given are few sample questions for reference. Teacher must design more
such questions so as to ensure the achievement of identified CO.

1. Explain the concept of introspection in PHP.


2. Explain serialization in PHP?

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 75

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Exercise

1. Develop a PHP code for serialization.


2. Develop a PHP code for introspection.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 76

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. References/ Suggestions for Further Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 77

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 78

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

Practical No: 10

Design a web page using following form controls:


a.Text box, b. Radio button, c. Check box, d. Buttons

I Practical Significance:

In this practical we will learn how to design a web page using different controls.

Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences


and basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to
solve the computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to
use the result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming
technologies and tools with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and
the team member in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

II Competency and Practical skills:

“Design a web page”


This practical is expected to learn following skill-

Design a web page using a.Text box, b. Radio button, c. Check box, d. Buttons
Relevant Course Outcome(s):

CO4 Use form controls with validation to collect user’s input.

III Practical Outcome (PrOs) :

Write a program to design a web page using a.Text box, b. Radio button, c. Check
box, d. Buttons

Relevant Affective domain related Outcome(s)

1. Work collaboratively
in team. 2. Follow
ethical practices

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 79

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

IV Minimum Theoretical Background:

a) Textbox:
A text input field allows a user to enter a single line of text .
Example: For welcome.html file and it has a text field and submit button.

<html>
<body>
<form action=”welcome.php” method=”get”>
<input type=”text” name=”user”/>
<input type=”submit” value=”Submit” />
</form>
</body>
</html>

b) Radio button:
Radio buttons let a user select only one of a limited number of
choices: Example:
<input type="radio" id="male" name="gender" value="male">
<label for="male">Male</label><br>
<input type="radio" id="female" name="gender" value="female">
<label for="female">Female</label><br>
<input type="radio" id="other" name="gender" value="other">
<label for="other">Other</label>
c) Check box:
<input type="checkbox" id="vehicle1" name="vehicle1" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
<input type="checkbox" id="vehicle2" name="vehicle2" value="Car">
<label for="vehicle2"> I have a car</label><br>
<input type="checkbox" id="vehicle3" name="vehicle3" value="Boat">
<label for="vehicle3"> I have a boat</label><br>
d) Buttons :
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<meta name="viewport" content="width=device-width, initial-scale=1">

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 80

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<body>
<div class="w3-container">
<h2>Buttons (w3-button)</h2>
<input type="button" class="w3-button w3-black" value="Input Button">
<button class="w3-button w3-black">Button Button</button>
<a href="#" class="w3-button w3-black">Link Button</a>
</div>
</body>
</html>

VII. Resources Required

IX. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

X. Program Code: Teacher must assign a separate program statement to group of


3-4 students.

1. Write a program to design a registration form using textbox, radio button, checkbox
and button.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 81

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………

XI. Result ( Output of code )

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 82

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design
more such questions so as to ensure the achievement of identified CO.
1. Write a use and syntax of following
controls: a. Textbox b. Radio button
c. Check box d. Buttons
(Space for Answer)

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 83

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII.Exercise

1. Develop web page and do validation using control text box, radio button, check box
and button.

(Space for Answer)

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 84

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………
………………………………………………………………………………………………

……………………………………………………………………………………………

………………………………………………………………………………………………

……………………………………………………………………………………………………

…………………………………………………………………………………………………

References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 85

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

111l

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 86

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

Practical No: 11
Design a web page using following form controls:
a. List box, b. Combo box, c. Hidden field box

V Practical Significance:

In this practical we will learn how to design a web page using different controls.

Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences


and basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to
solve the computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to
use the result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming
technologies and tools with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and
the team member in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

VI Competency and Practical skills:

“Design a web page”


This practical is expected to learn following skill-

Design a web page using a.List box, b. Combo box, c. Hidden field box
Relevant Course Outcome(s):

CO4. Use form controls with validation to collect user’s input.

VII Practical Outcome (PrOs) :

Write a program to design a web page using a.List box, b. Combo box, c. Hidden field box

Relevant Affective domain related Outcome(s)

1. Work collaboratively
in team. 2. Follow
ethical practices

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 87

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

VIII Minimum Theoretical Background:

a) List box:
A text input field allows a user to enter a single line of text.
Example: For welcome.html file and it has a text field and submit button.

<html>
<head>
<title>List Box</title>
</head>
<body>
<form action="" method="post">
<select name="foods[]" size="3">
<option value="Tomatoes">Tomatoes</option>
<option value="Cucumbers">Cucumbers</option>
<option value="Celery">Celery</option>
</select><br>
<input type="submit" name="submit" value="Submit"/>
</form>
<?php
$c= $_POST['foods'];
if(isset($c))
{
echo 'You have chosen ';
foreach($c as $key => $value)
{
echo $value;
}
}
else
{
echo "You haven't selected any
foods"; }
?>
</body>
</html>

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 88

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


b) Combo box:
Radio buttons let a user select only one of a limited number of choices:
Example:
<html>
<head>
<title>Combo Box</title>
</head>
<body>
<form action="" method="post">
<select name="foods[]">
<option value="Mango">Mango</option>
<option value="Banana">Banana</option>
<option value="Watermelon">Watermelon</option>
<option value="Grapes">Grapes</option>
</select><br>
<input type="submit" name="submit" value="Submit"/>
</form>
<?php
$c= $_POST['foods'];
if(isset($c))
{
echo 'You have chosen ';
foreach($c as $key => $value)
{
echo $value;
}
}
else
{
echo "You haven't selected any fruit";
}
?>
</body>
</html>

c) Hidden field box:


A hidden field is not displayed on the page. It simply stores the text value specified in the value attribute.
Hidden fields are great for passing additional information from the form to the server.
Syntax:
<input type="hidden" name="hiddenField" id="hiddenField" value="" />

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 89

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


<html>
<head>
<title>List Box</title>
</head>
<body>
<form action="" method="post">
<select name="foods[]" size="3">
<option value="Tomatoes">Tomatoes</option>
<option value="Cucumbers">Cucumbers</option>
<option value="Celery">Celery</option>
</select><br>
<input type="submit" name="submit" value="Submit"/>
</form>
<?php
$c= $_POST['foods'];
if(isset($c))
{
echo 'You have chosen ';
foreach($c as $key => $value)
{
echo $value;
}
}
else
{
echo "You haven't selected any foods";
}
?>
</body>
</html>

IX. Resources Required

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 90

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

X. Resources used:

Sr. no. Name of Resources


Computer System with board specifications
1

2 Software
Any other resource used
3

XI. Program Code: Teacher must assign a separate program statement


to group of 3-4 students.

1. Write a program to design a form using list box, combo box and Hidden field box.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 91

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

XII. Result ( Output of code )

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

…………………………………………………………………………………………………

………………………………………………………………………………………………

XIII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design
more such questions so as to ensure the achievement of identified CO.
a. Write a use and syntax of following
controls: b. List box b. Hidden field box
c. Combo box
( Space for Answer)

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 92

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XIV. Exercise

a. Write a program to design a form using list box, combo box.

( Space for Answer)

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 93

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

References/ Suggestions for Futher Reading.

b. https://www.w3schools.com/php/default.asp
c. https://www.guru99.com/what-is-php-program.html
d. https://www.tutorialspoint.com/php/
e. https://tutorialehtml.com/en/php-tutorial-
introduction/ f. www.tizag.com/phpT/
g. https://books.goalkicker.com/PHPBook/
h. https://codecourse.com/watch/php-basics

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 94

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


XV. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 95

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


Practical No: 12

Develop web page with data validation.

I Practical Significance:
Form validation is required to prevent web form abuse by malicious users. Improper
validation of form data is one of the main causes of security vulnerabilities. PHP
provides some inbuilt function using these functions that input data can be validated.

II Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic


mathematics, sciences and basic engineering to
solve the computer group related problem.
 Discipline Knowledge: Apply computer
programming knowledge to solve the computer
group related problems.
 Experiments and practices: Plan to
perform experiments and practices to use the result to
solve the computer group related problems.
 Engineering tools: Apply relevant Computer
programming technologies and tools with an
understanding of the limitations.
 Individual and Teamwork: Function effectively as a
leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

III Competency and Practical skills:


“Develop application using PHP”
 Develop web page with data validation

IV Relevant Course Outcome(s):


CO4: Use form controls with validation to collect user’s input.

V Practical Outcome (PrOs) :


 Develop web page with data validation.
.

VI Relevant Affective domain related Outcome(s)


1. Follow safety practices.
2. Practice good housekeeping
3. Demonstrate working as a leader/ a team member.
4. Follow ethical practices.

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 96

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


VII Minimum Theoretical Background:
 Form validation is required to prevent web form abuse by malicious users. Improper
validation of form data is one of the main causes of security vulnerabilities. It exposes
your website to attacks such as header injections, cross-site scripting, and SQL
injections.  header injection attacks can be used to send email spam from your web
server
 cross-site scripting may allow an attacker to post any data to your
site  SQL injection may corrupt your database backend

PHP provides some inbuilt function, using these functions that input data can be validated.

 empty() function will ensure that text field is not blank it is with some data,
function accepts a variable as an argument and returns. It TRUE when the text field
have filled with some data otherwise it return FALSE.
 is_numeric() function will ensure that data entered in a text field is a numeric
value, the function accepts a variable as an argument and returns TRUE when the
text field is submitted with numeric value otherwise it return FALSE.
 preg_match() function is specifically used to performed validation for entering
text in the text field, function accepts a “regular expression” argument and a variable as
an argument which has to be in specific pattern. Typically it is for validating email, IP
address and Pin code information in a form.

Example:

A php page fromvalidation.php is having three text field name, mobile number and email
from user, on clicking submit button a data will be submitted to PHP script validate.php on the
server, which will perform three different validation on these three text fields, it will check
that name should not be blank, mobile number should be in numeric form and the email is
validated with an email pattern.

Formvalidation.php

<html>
<body>
<form method="post" action="validdata.php">
<center>
<br><br>Enter Name <input type="text" name="sname">
<br><br>Mobile Number <input type="text" name="mobileno"
maxlength=10> <br><br>Email id <input type="text" name="email">
<br><br><input type="submit" name="submit"
value="Submit"> </center>
</form>
</body>
</html>

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 97

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

validate.php

<?php
$msg=0;
if($_SERVER['REQUEST_METHOD']=="POST")
{
if(empty($_POST['sname'] ))
{
echo "<br>Name can't be blank";
$msg=1;
} if(!
is_numeric($_POST['mobileno'])) {
echo "<br>Enter valid Mobile Number";
$msg=1;
}

$pattern= '/\b[\w.-]+@[\w.-]+\.[A-Z a-z]{2,6}\b/';

if(!preg_match($pattern,$_POST['email']))
{
echo "<br>Enter valid Email id";
$msg=1;
}

if($msg==0)
{
echo "Data has been recorded successfully";
}
}?
>

VII. Resources Required

IX. Resources used:


Sr. no. Name of Resources
Computer System with board specifications
1

2 Software
Any other resource used
3

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 98

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

X. Program Code: Teacher must assign a separate program statement to group of 3-4
students.
 Write a simple PHP program to check that emails are valid.
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………

XI. Result ( Output of code )


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
XII. Practical Related Questions:
Note: Below given are few sample questions for reference. Teacher must design more such
questions so as to ensure the achievement of identified CO.

Enlist and explain different method provided by php for web page validation.

( Space for Answer)


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 99

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………
………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 100

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XIII. References/ Suggestions for Futher Reading.


1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIV Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 101

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


Practical No: 13
Write simple PHP program to -
b. Set cookies and read it.
c. Demonstrate session management

I Practical Significance:

In this practical we will learn how to create cookie, modify it and


delete it.Also we will learn how to start a session, get session
variables and destroy a session.

Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic


mathematics, sciences and basic engineering to
solve the computer group related problem.
 Discipline Knowledge: Apply computer
programming knowledge to slove the computer
group related problems.
 Experiments and practices: Plan to
perform experiments and practices to use the result to
solve the computer group related problems.
 Engineering tools: Apply relevant Computer
programming technologies and tools with an
understanding of the limitations.
 Individual and Teamwork: Function effectively as a
leader and the team member
in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

II Competency and Practical skills:

a .“Set cookies and read it”


This practical is expected to develop the following skills.

1. Write a program to create cookies

2. Develop a program to modify cookies value

3. Write a program to delete cookies.

b.“Demonstrate session management”

This practical is expected to develop the following skills.

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 102

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

1. Write a program to start a session

2. Develop a program get session variables


3. Write a program to destroy a session

III Relevant Course Outcome(s):

CO4 Use form controls with validation to collect user’s input.

IV Practical Outcome (PrOs) :

 Write a program to create cookies.


 Develop a program to modify cookies value

 Write a program to delete cookies.


 Write a program to start a session
 Develop a program get session variables

 Write a program to destroy a session

V Relevant Affective domain related Outcome(s)

1. Work collaboratively
in team. 2. Follow
ethical practices

VI Minimum Theoretical Background:

A cookie is a small file with the maximum size of 4KB that the web server
stores on the client computer. They are typically used to keeping track of
information such as a username that the site can retrieve to personalize the
page when the user visits the website next time.

Fig. PHP Cookie

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 103

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

a. Create Cookies With PHP

A cookie is created with the setcookie() function.

Syntax:
setcookie(name, value, expire, path, domain, secure);

Only the name parameter is required. All other parameters are


optional. Program for creating cookie

<?php
$cookie_name = "Teacher";
$cookie_value = "Kimaya";
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1
day ?>

<html>
<body>
<?php
if (!isset($_COOKIE[$cookie_name]))
{
echo "Cookie named '" . $cookie_name . "' is not set!";
}
Else
{
echo "Cookie '" . $cookie_name . "' is set! <br>";
echo "Value is: " . $_COOKIE[$cookie_name];
}
?>

</body>
</html>

Output:
Cookie ' Teacher ' is set!
Value is: Kimaya

b. Session in PHP
A session is a way to store information (in variables) to be used across multiple
pages. Unlike a cookie, the information is not stored on the users computer.

What is a PHP Session?


When you work with an application, you open it, do some changes, and then you close
it. This is much like a Session. The computer knows who you are. It knows when you
start

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 104

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


the application and when you end. But on the internet there is one problem: the web
server does not know who you are or what you do, because the HTTP address doesn't
maintain state. Session variables solve this problem by storing user information to be
used across multiple pages (e.g. username, favorite color, etc). By default, session
variables last until the user closes the browser. So,Session variables hold information
about one single user, and are available to all pages in one application.

Start a PHP Session


A session is started with the session_start () function.

Session variables are set with the PHP global variable: $_SESSION.

Now, let's create a new page called "demo_session1.php". In this page, we start a
new PHP session and set some session variables:

Program to Start the session

<?php
// Start the session
session_start();
?> <!
DOCTYPE html>
<html>
<body>

<?php
// Set session variables
$_SESSION["favcolor"] =
"green"; $_SESSION["favanimal"]
= "cat"; echo "Session variables
are set."; ?>

</body>
</html>
Output:
Session variables are set.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 105

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


VII. Resources Required

VIII Resources used:

Sr. no. Name of Resources

1. Computer System with board specifications

2 Software
Any other resource Used
3

IX Program Code: Teacher must assign a separate program statement


to group of 3-4 students.

1.Write a program to create, modify and delete a cookie.

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 106

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………
……………………………………………………………………………………………
…………………………………………………………………………………………….

…………….………………………………………………………………………………

……………………………………………………………………………………………..
X Result ( Output of code )

…………………………………………………………………………………………….

……………………………………………………………………………………………

……………………………………………………………………………………………

…………………………………………………………………………………………..

……………………………………………………………………………………………

…………………………………………………………………………………………..

XVI. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher
must design more such questions so as to ensure the achievement of
identified CO.
a. Define cookie.
b. Define session.
c. Write difference between cookie and session .
( Space for Answer)

……………………………………………………………………………………………

…………………………………………………………………………………………….

……………………………………………………………………………………………

……………………………………………………………………………………………

……………………………………………………………………………………………

…………………………………………………………………………………………..
………………………………………………………………………………………………

………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 107

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

……………………………………………………………………………………………...

……………………………………………………………………………………………..

XI Exercise

Write a program to start and destroy a session.

( Space for Answer)

………………………………………………………………………………

………………………………………………………………………………

………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 108

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………….
.
…………………………………………………………………………………………
.
…………………………………………………………………………………………..

………………………………………………………………………………………….

……………………………………………………………………………………………

……………………………………………………………………………………………

……………………………………………………………………………………………

………………………………………………………………………………...

…………………………………………………………………………………………….

…………………………………………………………………………………………….

……………………………………………………………………………………………
………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 109

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XII Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 110

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

Practical No: 14

Write a PHP program for sending and receiving plain text message (e-mail).

I Practical Significance:

Students will be able to send and receive e-mail using PHP.

II Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to
slove the computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to
use the result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies
and tools with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and the
team member in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

III Competency and Practical skills:

“Develop application to send and receive e-mail using


PHP” This practical is expected to develop the following
skills.
1. Develop a program to send e-mail.
2. Develop a program to receive e-mail.

IV Relevant Course Outcome(s):

CO4 Use form controls with validation to collect user’s input.

V Practical Outcome (PrOs) :

1. Develop a program to send e-mail.


2. Develop a program to receive e-mail.

VI Relevant Affective domain related Outcome(s)

1. Work
collaboratively in team. 2.
Follow ethical practices.

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 111

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


VII Minimum Theoretical Background:

PHP mail:

PHP mail() is an inbuilt PHP function which is used to send emails from PHP scripts.
Syntax:

mail (to,subject,message,headers,parameters)

This mail() function accepts five parameters as follows and (the last two are optional).

Parameters

To

subject

message

headers

parameters

Simple program to use mail function :

<html>
<head>
<title> Email using PHP</title>
</head>
<body>
<?php
$to=”[email protected]”;
$subject=”Test mail”;
$message=”This is HTML message”;
$header=”From: [email protected]”;
$header .= “Cc:[email protected]”;
$retvalue=mail($to,$subject,$message,$header);
If($retvalue == true)
{
Echo “ Message sent successfully”;
}
Else
{
Echo “ Message could not be sent”;
}
?>
</body>
</html>

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 112

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

VII. Resources Required

IX. Resources used:


Sr. no.
Name of Resources
Computer System with board specifications
1

2 Software
3 Any other resource used

X. Program Code: Teacher must assign a separate program statement to group of


3-4 students.

Write a program to send and receive mail using PHP.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 113

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XII. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such
questions so as to ensure the achievement of identified CO.

1. Explain the use of mail() function in PHP.

2. Write a simple program to check that emails are valid.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 114

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 115

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XI. Exercise

1. Describe mail function parameter in detail.


(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 116

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 117

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

Practical No: 15

Develop a simple application to


-a) Enter data into database
b) Retrieve and present data from database

I Practical Significance:

In PHP using MYSQL data can be enter into database . Also we can retrieve and present
data from database.
II Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to
slove the computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use
the result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies
and tools with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and
the team member in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

III Competency and Practical skills:

“Develop application using


PHP” Write a PHP program to -
a. Enter data into database
b. Retrieve and present data from database

IV Relevant Course Outcome(s):

CO5 : Perform database operations in PHP.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 118

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

V Practical Outcome (PrOs) :

1. Develop a program to enter data into database


2. Develop a program to retrieve and present data from database

VI Relevant Affective domain related Outcome(s)

2. Follow safety practices.


3. Practice good housekeeping
4. Demonstrate working as a leader/ a
teammember. 5. Follow ethical practices.

VII Minimum Theoretical Background:

 Insert Data Into MySQL Using MySQLi

After a database and a table have been created, we can start adding data in them.

Here are some syntax rules to follow:

 The SQL query must be quoted in PHP


 String values inside the SQL query must be quoted
 Numeric values must not be quoted
 The word NULL must not be quoted
 The INSERT INTO statement is used to add new records to a MySQL table:
Syntax:
INSERT INTO table_name (column1, column2, column3,...)
VALUES (value1, value2, value3,...)

The following examples add a new record to the "MyGuests" table:

Example (MySQLi Object-oriented)

<?php
$servername =
"localhost"; $username
= "username";
$password = "password";
$dbname = "myDB";

// Create connection
$conn = new mysqli_connect($servername, $username, $password,
$dbname); // Check connection
if (!
$conn) {

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 119

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


die ("Connection failed: “. $conn-
>connect_error); }
Echo “Connected successfully”;
$sql = "INSERT INTO MyGuests (firstname,
lastname, email) VALUES ('Kimaya', 'Gaikwad',
'[email protected]')";

if (mysqli_query($conn,
$sql)) {
echo "New record
inserted successfully"; } else {
echo "could not insert record: " .
mysqli_error ($conn); }

Mysqli_close ($conn
); ?>

 Retrieve Data From a MySQL Database:

The SELECT statement is used to select data from one or more tables:

SELECT column_name(s) FROM table_name


or we can use the * character to select
ALL columns from a table:

SELECT * FROM table_name

Select Data With MySQLi

The following example selects the id, firstname and lastname columns from the MyGuests table and displays
it on the page:

<?php
$servername =
"localhost"; $username
= "username";
$password = "password";
$dbname = "myDB";

// Create connection
$conn = new mysqli_connect ($servername, $username, $password,
$dbname); // Check connection
if (!
$conn) {
die ("Connection failed: " .
mysqli_connect_error ( )); }

Echo “Connected successfully <br/> ”;


$sql = "SELECT id, firstname, lastname FROM MyGuests";

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 120

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


$result = mysqli_query($conn,$sql);

if (mysqli_num_rows($result) > 0)
{ // output data of each row
while ($row =
mysqli_fetch_assoc($result)) {
echo "id: " . $row["id"] . " . Name: " . $row["firstname"]. " " .
$row["lastname"]. "<br>"; }
} else
{
echo
"0 results"; }
Mysqli_close ($conn
); ?>
VII. Resources Required

Name of Resources
Sr. no.
Hardware: Computer System
1

Operating System
2
3 Software

IX. Resources used:


Sr. no.
Name of Resources
Computer System with board specifications
1

2 Software
3 Any other resource used

X. Program Code: Teacher must assign a separate program statement to group of


3-4 students.

Develop a program to retrieve and present data from database.


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 121

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

XI. Result ( Output of code )

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 122

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such
questions so as to ensure the achievement of identified CO.
1. What is MYSQL? How it is used in
PHP? 2. How to create database in
MYSQL?
3. Name to functions of PHP to connect MYSQL
database. 4. Explain mysqli_connect () function.

(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 123

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 124

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XII.Exercise

Write a PHP code to insert data into employee table.


(Space for Answer)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 125

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


XIII.References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-program.html
3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIV. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 126

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

Practical No: 16

Develop a simple application to Update, Delete table data from database.

I Practical Significance:

Data from table can be updated or deleted using MYSQL.

II Relevant Program Outcomes (POs)

 Basic Knowledge: Apply knowledge of basic mathematics, sciences and


basic engineering to solve the computer group related problem.
 Discipline Knowledge: Apply computer programming knowledge to
slove the computer group related problems.
 Experiments and practices: Plan to perform experiments and practices to use
the result to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming technologies
and tools with an understanding of the limitations.
 Individual and Teamwork: Function effectively as a leader and
the team member in diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

III Competency and Practical skills: “Develop application using PHP”


 Write a PHP program to Update, Delete table data from database.

IV Relevant Course Outcome(s):

CO5: Perform database operations in PHP.

V Practical Outcome (PrOs) :

1. Write a PHP program to-


 Update table data from database.
 Delete table data from database.

VI Relevant Affective domain related Outcome(s)

1. Follow safety practices.


2. Practice good housekeeping
3. Demonstrate working as a leader/ a
teammember. 4. Follow ethical practices.

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 127

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

VII Minimum Theoretical Background:

PHP MySQL Update Query

The update keyword is basically used to modify or edit the existing records in the database table. It
usually need a where clause to find out in which record change is to be done. It is must to specify
the where clause otherwise all records of that table got modify.
Syntax:
UPDATE table_name SET column1=value1,column2=value2... WHERE column = value

Previous records in empInfo table are:

Emp_id

This example updates some data in the "empInfo" table

<?php
//connect database
$con=mysqli_connect ("localhost","root","","Employee")
; If(!$con)
{
die(‘error in connection’.mysqli_error());
}
//select the database
mysqli_select_db(“mydb”,$con);

//update values of empInfo table


$data="UPDATE empInfo SET name='dev',mobile=9015501256 WHERE
email='[email protected]'"; mysqli_query ($con,$data);
mysqli_close($con);
?>

PHP MySQL: Delete Data

The DELETE statement is used to delete records from a


table: Syntax:
DELETE FROM table_name
WHERE some_column = some_value

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 128

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

This example deleted one row from "empInfo" table


<?php
//connect database
$con=mysqli_connect("localhost","root","","Employee")
// Check connection
if (!$con)
{
die("Connection failed: " . (mysqli_error()));
};

// sql to delete a record


$data="delete from empInfo WHERE
email='[email protected]'"; mysqli_query($con,$data);
mysqli_close($con);
?>
After deletion , the "empInfo" table will look like this:

Emp_id
2
3

VII. Resources Required

Name of Resources
Sr. no.
Hardware: Computer System
1

Operating System
2
3 Software
VIII. Resources used:

Sr. no.
Name of Resources
Computer System with board specifications
1

2 Software
3 Any other resource used

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 129

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


IX. Program Code: Teacher must assign a separate program statement to group of 3-
4 students.

1. Write a PHP program to Update table data from student database.

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

X. Result (Output of code)

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 130

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XI. Practical Related Questions:

Note: Below given are few sample questions for reference. Teacher must design more such
questions so as to ensure the achievement of identified CO.

1.Write a syntax for update and delete data in PHP.

(Space for Answer)

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………

………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 131

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

XI. Exercise

1. Write a PHP program to Update table data from student database.

(Space for Answer)

……………………………………………………………………………………………………..

………………………………………………………………………………………………………

…………………………………………………………………………………………………….

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………
………………………………………………………………………………………………………

………………………………………………………………………………………………………

………………………………………………………………………………………………………

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 132

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)


XII. References/ Suggestions for Futher Reading.

1. https://www.w3schools.com/php/default.asp
2. https://www.guru99.com/what-is-php-
program.html 3. https://www.tutorialspoint.com/php/
4. https://tutorialehtml.com/en/php-tutorial-
introduction/ 5. www.tizag.com/phpT/
6. https://books.goalkicker.com/PHPBook/
7. https://codecourse.com/watch/php-basics

XIII. Assessment Scheme

Performance Indicators
Process related ( 35 marks)
1 Logical formation
2 Debugging ability
3 Follow ethical practices
Product related (15 marks)
4 Expected output
5 Timely submission of report
6 Answer to sample questions
Total ( 50 Marks)

List of Students/ Team Members


1. ………………………………………………………
2. ………………………………………………………
3. ………………………………………………………
4. ………………………………………………………

Marks obtained

Process Related(35)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 133

Downloaded by Raj Debadwar ([email protected])


lOMoARcPSD|22614209

Web Based Application Development With PHP (22619)

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION 134

Downloaded by Raj Debadwar ([email protected])

You might also like