SlideShare a Scribd company logo
1 of 65
What is PHP?
 PHP stands for PHP: Hypertext Preprocessor
 PHP is a server-side scripting languagePHP scripts are
executed on the server.
 PHP supports many databases (MySQL, Informix, Oracle,
Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
 PHP is an open source software (OSS)
1
Why PHP?
 PHP runs on different platforms (Windows, Linux, Unix, etc.)
 PHP is compatible with almost all servers used today (Apache, IIS,
etc.)
 PHP is FREE to download from the official PHP resource:
www.php.net
 PHP is easy to learn
2
Where to Start?
 Install an Apache server on a Windows or Linux machine
 Install PHP on a Windows or Linux machine
 Install MySQL on a Windows or Linux machine
3
 Download PHP for free here: http://www.php.net/downloads.php
 Download MySQL for free here:
http://www.mysql.com/downloads/index.html
 Download Apache for free here: http://httpd.apache.org/download.cgi
4
Basic PHP Syntax
 A PHP scripting block always
 starts with <?php and
 ends with ?>
 Example
<?php
…….….
………..
?>
5
What is a PHP File?
 A PHP file normally contains
 HTML tags, just like an HTML file
 some PHP scripting code
6
Combining HTML and PHP
<html>
<head>
<title>A PHP script including HTML</title>
</head>
<body>
<b>
"hello world- HTML";
<?php
echo "hello world-PHP";
?>
</b>
</body>
</html>7
Comments in PHP
 In PHP, we use
// or # to make a single-line comment
/* and */ to make a large comment block.
8
Example
<html>
<body>
<?php
//This is a single-line comment
/*
This is
a comment
block
*/
?>
</body>
</html>
9
Variables in PHP
 Variables are used for storing a values, like text strings, numbers
or arrays.
 When a variable is set it can be used over and over again in your
script
 All variables in PHP start with a $ sign symbol.
 The correct way of setting a variable in PHP:
$var_name = value;
Eg: $name=“Sunil”;
10
Example
<?php
$txt = "Hello World!";
$number = 16;
echo $txt;
echo $number;
?>
11
Variable Naming Rules
A variable name must start with a
letter or an underscore "_"
A variable name can only contain
alpha-numeric characters and
underscores (a-Z, 0-9, and _ )
A variable name should not contain
spaces. If a variable name is more
than one word, it should be separated
with underscore ($my_string), or with
capitalization ($myString)
12
PHP String
 String variables are used for values that contains
character strings.
 Example 1:
<?php
$txt="Hello World";
echo $txt;
?>
The output of the code above will be:
Hello World
13
PHP String
 Example 2:
<?php
$txt1="Hello World";
$txt2="1234";
echo $txt1 . " " . $txt2;
?>
The output of the code above will be:
Hello World 1234
14
PHP String
 Example 2:
<?php
echo strlen("Hello world!");
?>
The output of the code above will be:
12
15
PHP Operators
 Arithmetic Operators
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus (division remainder)
++ Increment
-- Decrement
16
PHP Operators
Comparison Operators
== is equal to 5==8 returns false
!= is not equal 5!=8 returns true
> is greater than 5>8 returns false
< is less than 5<8 returns true
>= is greater than or equal to 5>=8 returns
false
<= is less than or equal to5<=8 returns true
17
Conditional Statements
If...Else Statement
 If you want to execute some code if a condition is true
and another code if a condition is false, use the if....else
statement.
 Syntax
if (condition)
code to be executed if condition is true;
else
code to be executed if condition is false;
18
Conditional Statements
Example 1:
<html>
<body>
<?php
$d=date("D");
if ($d=="Fri")
echo "Have a nice weekend!";
else
echo "Have a nice day!";
?>
</body>
</html>
19
Conditional StatementsExample 2:
<html>
<body>
<?php
$d=date("D");
if ($d=="Fri")
{
echo "Hello!<br />";
echo "Have a nice weekend!";
echo "See you on Monday!";
}
?>
</body>
</html>
20
Conditional Statements
 If you want to execute some code if one of several conditions are
true use the elseif statement
 Syntax
if (condition)
code to be executed if condition is true;
elseif (condition)
code to be executed if condition is true;
else
code to be executed if condition is false;
21
Conditional StatementsExample 3:
<html>
<body>
<?php
$d=date("D");
if ($d=="Fri")
echo "Have a nice weekend!";
elseif ($d=="Sun")
echo "Have a nice Sunday!";
else
echo "Have a nice day!";
?>
</body>
</html>
22
PHP Switch Statement
 If you want to select one of many blocks of code to be executed,
use the Switch statement.
 The switch statement is used to avoid long blocks of if..elseif..else
code.
23
PHP Switch StatementSyntax
switch (expression)
{
case label1:
code to be executed if expression = label1;
break;
case label2:
code to be executed if expression = label2;
break;
default:
code to be executed
if expression is different from both label1 and label2;
}24
PHP Switch StatementExample:
<html>
<body>
<?php
$x=2;
switch ($x)
{
case 1:
echo "Number 1";
break;
case 2:
echo "Number 2";
break;
case 3:
echo "Number 3";
break;
default:
echo "No number between 1 and 3";
}
?>
</body>
</html>
25
Exercise :
 Assign values to two variables. Use
comparison operators to test whether
the first value is
 The same as the second
 Less than the second
 Greater than the second
 Less than or equal to the second
 Print the result of each test to the
browser.
 Change the values assigned to your test
variables and run the script again.
26
PHP Arrays
What is an array?
 When working with PHP, sooner or later, you might want to
create many similar variables.
 Instead of having many similar variables, you can store the
data as elements in an array.
 Each element in the array has its own ID so that it can be
easily accessed.
27
PHP Arrays : Example 1
<?php
$names[0] = "Peter";
$names[1] = "Quagmire";
$names[2] = "Joe";
echo $names[1] . " and " . $names[2] .
" are ". $names[0] . "'s neighbors";
?>
The code above will output:
Quagmire and Joe are Peter's neighbors
28
PHP Arrays : Example 2
<?php
$names = array("Peter","Quagmire","Joe");
echo $names[1] . " and " . $names[2] .
" are ". $names[0] . "'s neighbors";
?>
The code above will output:
Quagmire and Joe are Peter's neighbors
29
Multidimensional Arrays
 In a multidimensional array,
 each element in the main array can also be an array.
 each element in the sub-array can be an array, and so on
30
Multidimensional Arrays
 In a multidimensional array,
 each element in the main array can also be an array.
 each element in the sub-array can be an array, and so on
31
PHP Looping
Looping statements in
PHP are used to execute
the same block of code a
specified number of
times.
32
PHP Looping
Looping statements in PHP are
used to execute the same block of
code a specified number of times.
In PHP we have the following
looping statements:
 while - loops
 do...while - loops
 for - loops
 foreach - loops33
The while Statement
 The while statement will execute a block of code if and
as long as a condition is true.
 Syntax
while (condition)
{
statement 1;
statement 2;
}
34
The while Statement
Example
.
.
.
$i=1;
while($i<=5)
{
echo "The number is " . $i . "<br />";
$i++;
}
.
.
.35
do...while Statement
The do...while statement will execute a
block of code at least once - it then will
repeat the loop as long as a condition
is true.
Syntax
do
{
code to be executed;
}
while (condition);
36
do...while Statement
 Example
.
.
$i=0;
do
{
$i++;
echo "The number is " . $i . "<br />";
}
while ($i<5);
.
.
37
The for Statement
 The for statement is used when you know how many
times you want to execute a statement or a list of
statements.
 Syntax
for (initialization; condition; increment)
{
code to be executed;
}
38
The for Statement
 Example
.
.
for ($i=1; $i<=5; $i++)
{
echo "Hello World!<br />";
}
.
.
39
The foreach Statement
The foreach statement is used to loop
through arrays.
For every loop, the value of the current array
element is assigned to $value (and the array
pointer is moved by one) - so on the next
loop, you'll be looking at the next element.
Syntax
foreach (array as value)
{
code to be executed;
}
40
The foreach Statement
Example
The following example demonstrates a loop
that will print the values of the given array:
<html>
<body>
<?php
$arr=array("one", "two", "three");
foreach ($arr as $value)
{
echo "Value: " . $value . "<br />";
}
?>
</body>
</html>
41
PHP Functions
 A function is a block of code that can be
executed whenever we need it.
 Creating PHP functions:
 All functions start with the word "function()"
 Name the function - It should be possible to
understand what the function does by its name.
The name can start with a letter or underscore
(not a number)
 Add a "{" - The function code starts after the
opening curly brace
 Insert the function code
 Add a "}" - The function is finished by a closing
curly brace
42
Example 1
A simple function that writes my name when it is called:
<html>
<body>
<?php
function writeMyName()
{
echo “Harvendra Pal Singh";
}
writeMyName();
?>
</body>
</html>
43
Example 2
<html>
<body>
<?php
function writeMyName()
{
echo "Kai Jim Refsnes";
}
echo "Hello world!<br />";
echo "My name is ";
writeMyName();
echo ".<br />That's right, ";
writeMyName();
echo " is my name.";
?>
</body>
</html>
44
Example 3
 The following example will write different first names,
<html>
<body>
<?php
function writeMyName($fname)
{
echo $fname . " .<br />";
}
echo "My name is ";
writeMyName(“Nimal");
echo "My name is ";
writeMyName(“Kamal");
echo "My name is ";
writeMyName(“Amal");
?>
</body>
</html>45
Example 4
 The following function has two parameters
<html>
<body>
<?php
function writeMyName($fname,$lname)
{
echo $fname . " Refsnes" . $lname . "<br />";
}
echo "My name is ";
writeMyName(“Nimal",“Amarasinghe");
echo "My name is ";
writeMyName(“Kamal",“Perera");
echo "My name is ";
writeMyName(“Amal",“Silva");
?>
</body>
</html>
46
PHP Functions - Return values
Functions can also be used to return values.
Example
<html>
<body>
<?php
function add($x,$y)
{
$total = $x + $y;
return $total;
}
echo "1 + 16 = " . add(1,16);
?>
</body>
</html>
47
PHP Forms
 The PHP $_GET and $_POST variables are used to
retrieve information from forms, like user input.
48
Example
 Welcome.htm
<html>
<body>
<form action="welcome.php" method="post">
Name: <input type="text" name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
49
Example
 welcome.php
<html>
<body>
Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old.
</body>
</html>
50
PHP $_GET
 The $_GET variable is used to collect values from a form
with method="get".
 Information sent from a form with the GET method is
visible to everyone (it will be displayed in the browser's
address bar)
 It has limits on the amount of information to send (max.
100 characters).
51
Example
<form action="welcome.php"
method="get">
Name: <input type="text"
name="name" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
 Welcome.php
Welcome <?php echo $_GET["name"]; ?>.<br />
You are <?php echo $_GET["age"]; ?> years old!
52
Note:
 When using the $_GET variable all variable names and
values are displayed in the URL.
 So this method should not be used when sending
passwords or other sensitive information!
 The HTTP GET method is not suitable on large variable
values; the value cannot exceed 100 characters.
53
PHP $_POST
 The $_POST variable is used to collect values from a
form with method="post".
 Information sent from a form with the POST method is
invisible to others and has no limits on the amount of
information to send.
54
Example
<form action="welcome.php" method="post">
Enter your name: <input type="text" name="name"
/>
Enter your age: <input type="text" name="age" />
<input type="submit" />
</form>
Welcome.php
Welcome <?php echo $_POST["name"]; ?>.<br />
You are <?php echo $_POST["age"]; ?> years old!55
PHP Database
56
Connecting to a MySQL
Database
 Before you can access and work with data in a
database, you must create a connection to the
database.
 In PHP, this is done with the mysql_connect() function.
 Syntax
mysql_connect(servername,username,password
);
 servername Optional. Specifies the server to connect to.
Default value is "localhost:3306"
 username Optional. Specifies the username to log in with.
Default value is the name of the user that owns
the server process
 password Optional. Specifies the password to log in with.
Default is ""
57
Example
 In the following example we store the
connection in a variable ($con). The "die"
part will be executed if the connection
fails:
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// some code
mysql_close($con);
?>
58
Create MySQLDatabase and
Tables
 To get PHP to execute a MySQL statement we must use
the mysql_query() function.
 This function is used to send a query or command to a
MySQL connection.
59
Example
 In the following example we create a database called "my_db":
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
if (mysql_query("CREATE DATABASE my_db",$con))
{
echo "Database created";
}
else
{
echo "Error creating database: " . mysql_error();
}
mysql_close($con);
?>
60
Create a Table Example
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
// Create table in my_db database
mysql_select_db("my_db", $con);
$sql = "CREATE TABLE person
(
FirstName varchar(15),
LastName varchar(15),
Age int
)";
mysql_query($sql,$con);
mysql_close($con);
61
Insert new records into a
database table
 Example
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
mysql_query("INSERT INTO person (FirstName, LastName, Age)
VALUES ('Peter', 'Griffin', '35')");
mysql_query("INSERT INTO person (FirstName, LastName, Age)
VALUES ('Glenn', 'Quagmire', '33')");
mysql_close($con);
?>
62
Insert Data From a Form Into
a Database
 Example : insert.html
<html>
<body>
<form action="insert.php" method="post">
Firstname: <input type="text" name="firstname" />
Lastname: <input type="text" name="lastname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>
</body>
</html>
63
Insert Data From a Form Into
a Database Example : insert.php
<?php
$con = mysql_connect("localhost","peter","abc123");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("my_db", $con);
$sql="INSERT INTO person (FirstName, LastName, Age)
VALUES
('$_POST[firstname]','$_POST[lastname]','$_POST[age]')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "1 record added";
mysql_close($con)
?>
64
Thank you.....
Arena Animation Siliguri,
Niladri Karmakar
65
Siliguri

More Related Content

What's hot

MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and EngineAbdul Manaf
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap ProtocolGlen Plantz
 
Mongoose: MongoDB object modelling for Node.js
Mongoose: MongoDB object modelling for Node.jsMongoose: MongoDB object modelling for Node.js
Mongoose: MongoDB object modelling for Node.jsYuriy Bogomolov
 
Oracle Database Security
Oracle Database SecurityOracle Database Security
Oracle Database SecurityTroy Kitch
 
Traquer les fuites mémoires avec Python
Traquer les fuites mémoires avec PythonTraquer les fuites mémoires avec Python
Traquer les fuites mémoires avec PythonVictor Stinner
 
Standard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & HowStandard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & HowMarkus Michalewicz
 
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
(BDT401) Amazon Redshift Deep Dive: Tuning and Best PracticesAmazon Web Services
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel frameworkAhmad Fatoni
 
Amazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and MigrationAmazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and MigrationAmazon Web Services
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim HegazyHackIT Ukraine
 
WebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL ConfigurationWebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL ConfigurationSimon Haslam
 
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11gOracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11gChien Chung Shen
 
Less06 networking
Less06 networkingLess06 networking
Less06 networkingAmit Bhalla
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpen Gurukul
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperJeff Smith
 

What's hot (20)

MySQL Architecture and Engine
MySQL Architecture and EngineMySQL Architecture and Engine
MySQL Architecture and Engine
 
Oracle Data Guard
Oracle Data GuardOracle Data Guard
Oracle Data Guard
 
The Ldap Protocol
The Ldap ProtocolThe Ldap Protocol
The Ldap Protocol
 
Sql server basics
Sql server basicsSql server basics
Sql server basics
 
Mongoose: MongoDB object modelling for Node.js
Mongoose: MongoDB object modelling for Node.jsMongoose: MongoDB object modelling for Node.js
Mongoose: MongoDB object modelling for Node.js
 
Oracle Database Security
Oracle Database SecurityOracle Database Security
Oracle Database Security
 
Traquer les fuites mémoires avec Python
Traquer les fuites mémoires avec PythonTraquer les fuites mémoires avec Python
Traquer les fuites mémoires avec Python
 
Php.ppt
Php.pptPhp.ppt
Php.ppt
 
Standard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & HowStandard Edition High Availability (SEHA) - The Why, What & How
Standard Edition High Availability (SEHA) - The Why, What & How
 
Chapter 4 Structured Query Language
Chapter 4 Structured Query LanguageChapter 4 Structured Query Language
Chapter 4 Structured Query Language
 
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
(BDT401) Amazon Redshift Deep Dive: Tuning and Best Practices
 
Introduction to laravel framework
Introduction to laravel frameworkIntroduction to laravel framework
Introduction to laravel framework
 
Oops in PHP
Oops in PHPOops in PHP
Oops in PHP
 
Amazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and MigrationAmazon RDS for MySQL: Best Practices and Migration
Amazon RDS for MySQL: Best Practices and Migration
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
 
WebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL ConfigurationWebLogic in Practice: SSL Configuration
WebLogic in Practice: SSL Configuration
 
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11gOracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
Oracle管理藝術第1章 在Linux作業體統安裝Oracle 11g
 
Less06 networking
Less06 networkingLess06 networking
Less06 networking
 
OpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQLOpenGurukul : Database : PostgreSQL
OpenGurukul : Database : PostgreSQL
 
All of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL DeveloperAll of the Performance Tuning Features in Oracle SQL Developer
All of the Performance Tuning Features in Oracle SQL Developer
 

Similar to PHP - Web Development

Free PHP Book Online | PHP Development in India
Free PHP Book Online | PHP Development in IndiaFree PHP Book Online | PHP Development in India
Free PHP Book Online | PHP Development in IndiaDeepak Rajput
 
PHP MATERIAL
PHP MATERIALPHP MATERIAL
PHP MATERIALzatax
 
Php(report)
Php(report)Php(report)
Php(report)Yhannah
 
FYBSC IT Web Programming Unit IV PHP and MySQL
FYBSC IT Web Programming Unit IV  PHP and MySQLFYBSC IT Web Programming Unit IV  PHP and MySQL
FYBSC IT Web Programming Unit IV PHP and MySQLArti Parab Academics
 
What Is Php
What Is PhpWhat Is Php
What Is PhpAVC
 
Php a dynamic web scripting language
Php   a dynamic web scripting languagePhp   a dynamic web scripting language
Php a dynamic web scripting languageElmer Concepcion Jr.
 
Php intro by sami kz
Php intro by sami kzPhp intro by sami kz
Php intro by sami kzsami2244
 
PHP Course (Basic to Advance)
PHP Course (Basic to Advance)PHP Course (Basic to Advance)
PHP Course (Basic to Advance)Coder Tech
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPwahidullah mudaser
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Gheyath M. Othman
 
Php by shivitomer
Php by shivitomerPhp by shivitomer
Php by shivitomerShivi Tomer
 

Similar to PHP - Web Development (20)

Free PHP Book Online | PHP Development in India
Free PHP Book Online | PHP Development in IndiaFree PHP Book Online | PHP Development in India
Free PHP Book Online | PHP Development in India
 
PHP MATERIAL
PHP MATERIALPHP MATERIAL
PHP MATERIAL
 
Php(report)
Php(report)Php(report)
Php(report)
 
FYBSC IT Web Programming Unit IV PHP and MySQL
FYBSC IT Web Programming Unit IV  PHP and MySQLFYBSC IT Web Programming Unit IV  PHP and MySQL
FYBSC IT Web Programming Unit IV PHP and MySQL
 
What Is Php
What Is PhpWhat Is Php
What Is Php
 
Php a dynamic web scripting language
Php   a dynamic web scripting languagePhp   a dynamic web scripting language
Php a dynamic web scripting language
 
Php intro by sami kz
Php intro by sami kzPhp intro by sami kz
Php intro by sami kz
 
Php
PhpPhp
Php
 
PHP Course (Basic to Advance)
PHP Course (Basic to Advance)PHP Course (Basic to Advance)
PHP Course (Basic to Advance)
 
Basic of PHP
Basic of PHPBasic of PHP
Basic of PHP
 
Day1
Day1Day1
Day1
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
 
PHP Reviewer
PHP ReviewerPHP Reviewer
PHP Reviewer
 
Intro to php
Intro to phpIntro to php
Intro to php
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php by shivitomer
Php by shivitomerPhp by shivitomer
Php by shivitomer
 
PHP
PHPPHP
PHP
 
Php
PhpPhp
Php
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 

PHP - Web Development

  • 1. What is PHP?  PHP stands for PHP: Hypertext Preprocessor  PHP is a server-side scripting languagePHP scripts are executed on the server.  PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)  PHP is an open source software (OSS) 1
  • 2. Why PHP?  PHP runs on different platforms (Windows, Linux, Unix, etc.)  PHP is compatible with almost all servers used today (Apache, IIS, etc.)  PHP is FREE to download from the official PHP resource: www.php.net  PHP is easy to learn 2
  • 3. Where to Start?  Install an Apache server on a Windows or Linux machine  Install PHP on a Windows or Linux machine  Install MySQL on a Windows or Linux machine 3
  • 4.  Download PHP for free here: http://www.php.net/downloads.php  Download MySQL for free here: http://www.mysql.com/downloads/index.html  Download Apache for free here: http://httpd.apache.org/download.cgi 4
  • 5. Basic PHP Syntax  A PHP scripting block always  starts with <?php and  ends with ?>  Example <?php …….…. ……….. ?> 5
  • 6. What is a PHP File?  A PHP file normally contains  HTML tags, just like an HTML file  some PHP scripting code 6
  • 7. Combining HTML and PHP <html> <head> <title>A PHP script including HTML</title> </head> <body> <b> "hello world- HTML"; <?php echo "hello world-PHP"; ?> </b> </body> </html>7
  • 8. Comments in PHP  In PHP, we use // or # to make a single-line comment /* and */ to make a large comment block. 8
  • 9. Example <html> <body> <?php //This is a single-line comment /* This is a comment block */ ?> </body> </html> 9
  • 10. Variables in PHP  Variables are used for storing a values, like text strings, numbers or arrays.  When a variable is set it can be used over and over again in your script  All variables in PHP start with a $ sign symbol.  The correct way of setting a variable in PHP: $var_name = value; Eg: $name=“Sunil”; 10
  • 11. Example <?php $txt = "Hello World!"; $number = 16; echo $txt; echo $number; ?> 11
  • 12. Variable Naming Rules A variable name must start with a letter or an underscore "_" A variable name can only contain alpha-numeric characters and underscores (a-Z, 0-9, and _ ) A variable name should not contain spaces. If a variable name is more than one word, it should be separated with underscore ($my_string), or with capitalization ($myString) 12
  • 13. PHP String  String variables are used for values that contains character strings.  Example 1: <?php $txt="Hello World"; echo $txt; ?> The output of the code above will be: Hello World 13
  • 14. PHP String  Example 2: <?php $txt1="Hello World"; $txt2="1234"; echo $txt1 . " " . $txt2; ?> The output of the code above will be: Hello World 1234 14
  • 15. PHP String  Example 2: <?php echo strlen("Hello world!"); ?> The output of the code above will be: 12 15
  • 16. PHP Operators  Arithmetic Operators + Addition - Subtraction * Multiplication / Division % Modulus (division remainder) ++ Increment -- Decrement 16
  • 17. PHP Operators Comparison Operators == is equal to 5==8 returns false != is not equal 5!=8 returns true > is greater than 5>8 returns false < is less than 5<8 returns true >= is greater than or equal to 5>=8 returns false <= is less than or equal to5<=8 returns true 17
  • 18. Conditional Statements If...Else Statement  If you want to execute some code if a condition is true and another code if a condition is false, use the if....else statement.  Syntax if (condition) code to be executed if condition is true; else code to be executed if condition is false; 18
  • 19. Conditional Statements Example 1: <html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; else echo "Have a nice day!"; ?> </body> </html> 19
  • 20. Conditional StatementsExample 2: <html> <body> <?php $d=date("D"); if ($d=="Fri") { echo "Hello!<br />"; echo "Have a nice weekend!"; echo "See you on Monday!"; } ?> </body> </html> 20
  • 21. Conditional Statements  If you want to execute some code if one of several conditions are true use the elseif statement  Syntax if (condition) code to be executed if condition is true; elseif (condition) code to be executed if condition is true; else code to be executed if condition is false; 21
  • 22. Conditional StatementsExample 3: <html> <body> <?php $d=date("D"); if ($d=="Fri") echo "Have a nice weekend!"; elseif ($d=="Sun") echo "Have a nice Sunday!"; else echo "Have a nice day!"; ?> </body> </html> 22
  • 23. PHP Switch Statement  If you want to select one of many blocks of code to be executed, use the Switch statement.  The switch statement is used to avoid long blocks of if..elseif..else code. 23
  • 24. PHP Switch StatementSyntax switch (expression) { case label1: code to be executed if expression = label1; break; case label2: code to be executed if expression = label2; break; default: code to be executed if expression is different from both label1 and label2; }24
  • 25. PHP Switch StatementExample: <html> <body> <?php $x=2; switch ($x) { case 1: echo "Number 1"; break; case 2: echo "Number 2"; break; case 3: echo "Number 3"; break; default: echo "No number between 1 and 3"; } ?> </body> </html> 25
  • 26. Exercise :  Assign values to two variables. Use comparison operators to test whether the first value is  The same as the second  Less than the second  Greater than the second  Less than or equal to the second  Print the result of each test to the browser.  Change the values assigned to your test variables and run the script again. 26
  • 27. PHP Arrays What is an array?  When working with PHP, sooner or later, you might want to create many similar variables.  Instead of having many similar variables, you can store the data as elements in an array.  Each element in the array has its own ID so that it can be easily accessed. 27
  • 28. PHP Arrays : Example 1 <?php $names[0] = "Peter"; $names[1] = "Quagmire"; $names[2] = "Joe"; echo $names[1] . " and " . $names[2] . " are ". $names[0] . "'s neighbors"; ?> The code above will output: Quagmire and Joe are Peter's neighbors 28
  • 29. PHP Arrays : Example 2 <?php $names = array("Peter","Quagmire","Joe"); echo $names[1] . " and " . $names[2] . " are ". $names[0] . "'s neighbors"; ?> The code above will output: Quagmire and Joe are Peter's neighbors 29
  • 30. Multidimensional Arrays  In a multidimensional array,  each element in the main array can also be an array.  each element in the sub-array can be an array, and so on 30
  • 31. Multidimensional Arrays  In a multidimensional array,  each element in the main array can also be an array.  each element in the sub-array can be an array, and so on 31
  • 32. PHP Looping Looping statements in PHP are used to execute the same block of code a specified number of times. 32
  • 33. PHP Looping Looping statements in PHP are used to execute the same block of code a specified number of times. In PHP we have the following looping statements:  while - loops  do...while - loops  for - loops  foreach - loops33
  • 34. The while Statement  The while statement will execute a block of code if and as long as a condition is true.  Syntax while (condition) { statement 1; statement 2; } 34
  • 35. The while Statement Example . . . $i=1; while($i<=5) { echo "The number is " . $i . "<br />"; $i++; } . . .35
  • 36. do...while Statement The do...while statement will execute a block of code at least once - it then will repeat the loop as long as a condition is true. Syntax do { code to be executed; } while (condition); 36
  • 37. do...while Statement  Example . . $i=0; do { $i++; echo "The number is " . $i . "<br />"; } while ($i<5); . . 37
  • 38. The for Statement  The for statement is used when you know how many times you want to execute a statement or a list of statements.  Syntax for (initialization; condition; increment) { code to be executed; } 38
  • 39. The for Statement  Example . . for ($i=1; $i<=5; $i++) { echo "Hello World!<br />"; } . . 39
  • 40. The foreach Statement The foreach statement is used to loop through arrays. For every loop, the value of the current array element is assigned to $value (and the array pointer is moved by one) - so on the next loop, you'll be looking at the next element. Syntax foreach (array as value) { code to be executed; } 40
  • 41. The foreach Statement Example The following example demonstrates a loop that will print the values of the given array: <html> <body> <?php $arr=array("one", "two", "three"); foreach ($arr as $value) { echo "Value: " . $value . "<br />"; } ?> </body> </html> 41
  • 42. PHP Functions  A function is a block of code that can be executed whenever we need it.  Creating PHP functions:  All functions start with the word "function()"  Name the function - It should be possible to understand what the function does by its name. The name can start with a letter or underscore (not a number)  Add a "{" - The function code starts after the opening curly brace  Insert the function code  Add a "}" - The function is finished by a closing curly brace 42
  • 43. Example 1 A simple function that writes my name when it is called: <html> <body> <?php function writeMyName() { echo “Harvendra Pal Singh"; } writeMyName(); ?> </body> </html> 43
  • 44. Example 2 <html> <body> <?php function writeMyName() { echo "Kai Jim Refsnes"; } echo "Hello world!<br />"; echo "My name is "; writeMyName(); echo ".<br />That's right, "; writeMyName(); echo " is my name."; ?> </body> </html> 44
  • 45. Example 3  The following example will write different first names, <html> <body> <?php function writeMyName($fname) { echo $fname . " .<br />"; } echo "My name is "; writeMyName(“Nimal"); echo "My name is "; writeMyName(“Kamal"); echo "My name is "; writeMyName(“Amal"); ?> </body> </html>45
  • 46. Example 4  The following function has two parameters <html> <body> <?php function writeMyName($fname,$lname) { echo $fname . " Refsnes" . $lname . "<br />"; } echo "My name is "; writeMyName(“Nimal",“Amarasinghe"); echo "My name is "; writeMyName(“Kamal",“Perera"); echo "My name is "; writeMyName(“Amal",“Silva"); ?> </body> </html> 46
  • 47. PHP Functions - Return values Functions can also be used to return values. Example <html> <body> <?php function add($x,$y) { $total = $x + $y; return $total; } echo "1 + 16 = " . add(1,16); ?> </body> </html> 47
  • 48. PHP Forms  The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input. 48
  • 49. Example  Welcome.htm <html> <body> <form action="welcome.php" method="post"> Name: <input type="text" name="name" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> </body> </html> 49
  • 50. Example  welcome.php <html> <body> Welcome <?php echo $_POST["name"]; ?>.<br /> You are <?php echo $_POST["age"]; ?> years old. </body> </html> 50
  • 51. PHP $_GET  The $_GET variable is used to collect values from a form with method="get".  Information sent from a form with the GET method is visible to everyone (it will be displayed in the browser's address bar)  It has limits on the amount of information to send (max. 100 characters). 51
  • 52. Example <form action="welcome.php" method="get"> Name: <input type="text" name="name" /> Age: <input type="text" name="age" /> <input type="submit" /> </form>  Welcome.php Welcome <?php echo $_GET["name"]; ?>.<br /> You are <?php echo $_GET["age"]; ?> years old! 52
  • 53. Note:  When using the $_GET variable all variable names and values are displayed in the URL.  So this method should not be used when sending passwords or other sensitive information!  The HTTP GET method is not suitable on large variable values; the value cannot exceed 100 characters. 53
  • 54. PHP $_POST  The $_POST variable is used to collect values from a form with method="post".  Information sent from a form with the POST method is invisible to others and has no limits on the amount of information to send. 54
  • 55. Example <form action="welcome.php" method="post"> Enter your name: <input type="text" name="name" /> Enter your age: <input type="text" name="age" /> <input type="submit" /> </form> Welcome.php Welcome <?php echo $_POST["name"]; ?>.<br /> You are <?php echo $_POST["age"]; ?> years old!55
  • 57. Connecting to a MySQL Database  Before you can access and work with data in a database, you must create a connection to the database.  In PHP, this is done with the mysql_connect() function.  Syntax mysql_connect(servername,username,password );  servername Optional. Specifies the server to connect to. Default value is "localhost:3306"  username Optional. Specifies the username to log in with. Default value is the name of the user that owns the server process  password Optional. Specifies the password to log in with. Default is "" 57
  • 58. Example  In the following example we store the connection in a variable ($con). The "die" part will be executed if the connection fails: <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } // some code mysql_close($con); ?> 58
  • 59. Create MySQLDatabase and Tables  To get PHP to execute a MySQL statement we must use the mysql_query() function.  This function is used to send a query or command to a MySQL connection. 59
  • 60. Example  In the following example we create a database called "my_db": <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } if (mysql_query("CREATE DATABASE my_db",$con)) { echo "Database created"; } else { echo "Error creating database: " . mysql_error(); } mysql_close($con); ?> 60
  • 61. Create a Table Example $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } // Create table in my_db database mysql_select_db("my_db", $con); $sql = "CREATE TABLE person ( FirstName varchar(15), LastName varchar(15), Age int )"; mysql_query($sql,$con); mysql_close($con); 61
  • 62. Insert new records into a database table  Example <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); mysql_query("INSERT INTO person (FirstName, LastName, Age) VALUES ('Peter', 'Griffin', '35')"); mysql_query("INSERT INTO person (FirstName, LastName, Age) VALUES ('Glenn', 'Quagmire', '33')"); mysql_close($con); ?> 62
  • 63. Insert Data From a Form Into a Database  Example : insert.html <html> <body> <form action="insert.php" method="post"> Firstname: <input type="text" name="firstname" /> Lastname: <input type="text" name="lastname" /> Age: <input type="text" name="age" /> <input type="submit" /> </form> </body> </html> 63
  • 64. Insert Data From a Form Into a Database Example : insert.php <?php $con = mysql_connect("localhost","peter","abc123"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("my_db", $con); $sql="INSERT INTO person (FirstName, LastName, Age) VALUES ('$_POST[firstname]','$_POST[lastname]','$_POST[age]')"; if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "1 record added"; mysql_close($con) ?> 64
  • 65. Thank you..... Arena Animation Siliguri, Niladri Karmakar 65 Siliguri