SlideShare a Scribd company logo
Introduction to World Wide Web and basics of PHP
By http://programmerblog.net
By Programmer Blog http://programmerblog.net/
What is Internet and World Wide Web?
 Internet – Global system of interconnected networks
 It is a network of networks that consists of millions of private, public, academic,
business, and government networks of local to global scope.
 Use TCP/IP to serve billions of users worldwide.
 Voice over Internet Protocol (VoIP) and IPTV. Newspaper publishing, blogging, and
web feeds.
 Human interactions through instant messaging, Internet forums, and social
networking sites.
 www – Collection of interconnected documents and other resources
 System of interlinked hypertext documents contained on the Internet.
 http – Hyper Text Transfer Protocol
 Hyperlink (or link) is a reference to a document that the reader can directly follow.
 Hypertext is text displayed with references (hyperlinks) to other text that the reader
can immediately access
 Protocol to transfer hypertext docs from server to client.
ProgrammerBlog.Net http://programmerblog.net/
Web Application Development
 Web application development is the process and practice of
developing web applications.
 Request / Response Model
 In HTTP, web browsers or spiders typically act as clients, while an
application running on the computer hosting the web site acts as a server
 Static vs. Dynamic web pages
 Server Side Scripting Languages
 J.S.P, ASP. Net Cold Fusion, Python, PHP
ProgrammerBlog.Net http://programmerblog.net/
W.A.M.P Installation
 On windows WAMP or XAMPP can be installed
 Web Server – Apache
 Server Side Language – PHP
 DBMS – MySql
 PhpMyAdmin
ProgrammerBlog.Net http://programmerblog.net/
PHP History
 Rasmus Lerdorf - Creator of PHP language
 PHP - 1995 Collection of Perl/CGI scripts
 PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl
scripts for tracking accesses to his online resume
 PHP/FI - 1997 Form Interpreter
 Rasmus wrote a much larger C implementation, which was able to
communicate with databases, and enabled users to develop simple
dynamic Web applications .
 Personal Home Page / Forms Interpreter
 PHP 3.0 June 1998
 lots of different databases, protocols and APIs,
 Developers joined in and submit new extension modules
 PHP: Hypertext Preprocessor.
ProgrammerBlog.Net http://programmerblog.net/
PHP History
 PHP 4
 Zend Engine Introduced in 1999
 Support for Web servers
 Object Oriented Programming
 PHP 5
 Zend Engine 2.0
 XML and Web Services
 Object Oriented Support
 Exception Handling
 A lot of new Features
ProgrammerBlog.Net http://programmerblog.net/
PHP History
PHP 7 – current version on PHP
is latest version of PHP with lot of improvement. Some of
new features are:
1. Speed
2. Type Declaration
3. Return Type Declarations
4. Error Handling
5. Spaceship Operator
6. Null Coalesce Operator
7. Unicode support for emoji and international characters.
8. Constant arrays using define()
9. Anonymous classes
10.Generator delegation
ProgrammerBlog.Net http://programmerblog.net/
Why PHP ?
 Open Source – Linux – Apache - PHP - MySQL
 One of top 5 most popular languages
 Small – medium – enterprise level applications
 Server Side Scripting
 Command Line
 Desktop Applications (PHP – GTK)
 Available for Windows, Linux, Mac
Many Web Servers – Apache, IIS, nginx, Lighthttpd
 Relational / No SQL Databases MySql, Oracle, MSSQL, mongoDB,
PostgreSql
 Built in Support – Regex, XML and other functions math etc
 Services – LDAP, POP3 and so on
ProgrammerBlog.Net http://programmerblog.net/
PHP – Online Popular Projects
 PHP
 Facebook - The world’s biggest social networking platform is written in
PHP.
 150 million users and counting, and in my experience, significantly faster
and more stable than competing platforms written in other languages
(e.g. MySpace).
 Yahoo! - formerly the world’s largest search engine. Yahoo! makes use
of PHP.
 You Tube - the world’s biggest video sharing website uses PHP
technology.
 Wikipedia - User contributed web encyclopedia has PHP elements.
 Digg.com
Social news network.
 Sourceforge.org
The world's largest Open Source software development web site.
 Flickr.com
Online photo sharing and storing:
ProgrammerBlog.Net http://programmerblog.net/
PHP Configuration
PHP.ini
Php configuration file is read when php starts up. Values of different environment
variables can be set in php.ini file. Some of the features are:
 Execution time
 File upload size and so on
 Session paths
 Upload file size
 Short tags
 Error reporting
 Safe mode
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Code Blocks
 Standard Tags: <?php …… ?>
 Short Tags: <?........ ?>
 ASP Tags: <%.....%> (Removed from php 7.0)
 Script Tags
 <script language=“PHP”></script> (Removed from
PHP 7.0)
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Language Constructs
 Constructs are elements that are built-into the
language
 echo
 echo 10;
Every statement ends with semi colon.
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Comments
Single Line Comments -
 // this is a single line comment
 # this is a single line comment
Multi Line Comments - /* ….. */
 /* This is a
Multi line comment
 */
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Data Types
Scalar Data types
 Integer (Signed)
 String
 Floating point
 Boolean
Composite
 Arrays
 Objects
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Data Types
Integer
 echo 10; echo -123;
echo 066; echo 0xFF;
Floating Point
 echo 10.2; echo 0.009;
 echo 2E7; echo 1e2;
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Data Types
String
 echo “ String in double quotes”;
echo ‘ string in single quotes’;
Boolean
 True or False;
Composite Data types
 Arrays , Objects
Null
Resource
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Variables
PHP is a loosely typed language
Variables are storage container in memory
Variables are identified with $ sign
Valid variables:
 [a-zA-Z], numbers, underscores
 Variable variable
 contents of variable to reference a new variable
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Variables
Variables existence
 Isset
Destroying
 unset
Constants
 define(“country", “United States");
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Operators
operators are the catalysts of operations
 Assignment Operators =
 Arithmetic Operators + - / * %
 String Operators .
 Comparison Operators < > <= >= Ternary operator
 Logical Operators && || ! XOR
 Bitwise Operators | & XOR NOT
 Error Control Operators
 Incrementing/Decrementing Operators ++ --
 Typeof
ProgrammerBlog.Net http://programmerblog.net/
Operators: Increment / Decrement
 $a = 1;
 // Assign the integer 1 to $a
 echo $a++;
 // Outputs 1, $a is now equal to 2
 echo ++$a;
 // Outputs 3, $a is now equal to 3
 echo --$a;
 // Outputs 2, $a is now equal to 2
 echo $a--;
 // Outputs 2, $a is now equal to 1
ProgrammerBlog.Net http://programmerblog.net/
Operators: Arithmetic Operators
Addition $a = 1 + 3.5;
Subtraction $a = 4 - 2;
Multiplication $a = 8 * 3;
Division $a = 15 / 5;
Modulus $a = 23 % 7;
ProgrammerBlog.Net http://programmerblog.net/
Concatenation - Assignment Operator
$string = “PHP" . “MySql";
$string2 = “Zend";
$string .= $string2;
echo $string;
Will print: PHP MySql Zend
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Operator Precedence
 $x = 9 + 1 * 10
 Expecting result 100 but getting 19 – Multiplication has higher precedence
Highest Precedence * / %
+ - .
< <= > >=
&&
||
And
Xor
Lowest precedence or
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Escape Sequences
 " Print the next character as a double quote, not a string closer
 ' Print the next character as a single quote, not a string closer
 n Print a new line character (remember our print statements?)
 t Print a tab character
 r Print a carriage return (not used very often)
 $ Print the next character as a dollar, not as part of a variable
  Print the next character as a backslash, not an escape character
 $MyString = "This is an "escaped" string";
$MySingleString = 'This 'will' work';
$MyNonVariable = "I have $marks in my pocket";
$MyNewline = "This ends with a line returnn";
$MyFile = "c:windowssystem32myfile.txt";
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Control Structure -1
 Control structures allow you to control the flow of
your script
if (expression1) {
…
} elseif (expression2) {
…
} else {
…
}
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Control Structure -1
ternary operator
 (condition) ? ’output’ : ’output’;
 echo 10 == $x ? ’Yes’ : ’No’;
 Equivalent in IF-Else
if (10 == $x) {
echo 'Yes';
} else {
echo 'No';
}
ProgrammerBlog.Net http://programmerblog.net/
Control Structures – Switch statement
 switch (n)
{
case label1:
//code to be executed if n=label1;
break;
case label2:
//code to be executed if n=label2;
break;
default:
// if n is different from both label1 and label2;
}
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Loops
 while - loops through a block of code while a
specified condition is true
 do...while - loops through a block of code once,
and then repeats the loop as long as a specified
condition is true
 for - loops through a block of code a specified
number of times
 foreach - loops through a block of code for each
element in an array
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: While Loop
 while (condition)
{
code to be executed;
}
 $i=1;
while($i<=5)
{
echo "The number is " . $i . "<br />";
$i++;
}
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: Do While Loop
 do
{
code to be executed;
}
while (condition);
 $i=1;
do
{
$i++;
echo "The number is " . $i . "<br />";
}
while ($i<=5);
ProgrammerBlog.Net http://programmerblog.net/
PHP Basics: For Loop
 for (init; condition; increment)
{
code to be executed;
}
 for ($i=1; $i<=5; $i++)
{
echo "The number is " . $i . "<br />";
}
 Break
 Causes the loop to stop and program execution to begin at the
statement immediately following the loop.
 Continue
 causes the iteration to be skipped
ProgrammerBlog.Net http://programmerblog.net/
ProgrammerBlog.Net http://programmerblog.net/
Thanks for reading
For more articles and video
tutorials please visit our Blog
http://Programmer Blog

More Related Content

What's hot (20)

Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
Jussi Pohjolainen
 
Php
PhpPhp
Php
Rajkiran Mummadi
 
Class 2 - Introduction to PHP
Class 2 - Introduction to PHPClass 2 - Introduction to PHP
Class 2 - Introduction to PHP
Ahmed Swilam
 
Arrays &amp; functions in php
Arrays &amp; functions in phpArrays &amp; functions in php
Arrays &amp; functions in php
Ashish Chamoli
 
PHP Web Programming
PHP Web ProgrammingPHP Web Programming
PHP Web Programming
Muthuselvam RS
 
02 Php Vars Op Control Etc
02 Php Vars Op Control Etc02 Php Vars Op Control Etc
02 Php Vars Op Control Etc
Geshan Manandhar
 
php 2 Function creating, calling, PHP built-in function
php 2 Function creating, calling,PHP built-in functionphp 2 Function creating, calling,PHP built-in function
php 2 Function creating, calling, PHP built-in function
tumetr1
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Muthuganesh S
 
Anonymous Functions in PHP 5.3 - Matthew Weier O’Phinney
Anonymous Functions in PHP 5.3 - Matthew Weier O’PhinneyAnonymous Functions in PHP 5.3 - Matthew Weier O’Phinney
Anonymous Functions in PHP 5.3 - Matthew Weier O’Phinney
Hipot Studio
 
Intermediate PHP
Intermediate PHPIntermediate PHP
Intermediate PHP
Bradley Holt
 
A Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP GeneratorsA Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP Generators
Mark Baker
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
jsmith92
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
Ayesh Karunaratne
 
07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards
Denis Ristic
 
Introduction in php
Introduction in phpIntroduction in php
Introduction in php
Bozhidar Boshnakov
 
Php
PhpPhp
Php
Shyam Khant
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
 
Php and MySQL
Php and MySQLPhp and MySQL
Php and MySQL
Tiji Thomas
 
Php Chapter 2 3 Training
Php Chapter 2 3 TrainingPhp Chapter 2 3 Training
Php Chapter 2 3 Training
Chris Chubb
 
Class 2 - Introduction to PHP
Class 2 - Introduction to PHPClass 2 - Introduction to PHP
Class 2 - Introduction to PHP
Ahmed Swilam
 
Arrays &amp; functions in php
Arrays &amp; functions in phpArrays &amp; functions in php
Arrays &amp; functions in php
Ashish Chamoli
 
02 Php Vars Op Control Etc
02 Php Vars Op Control Etc02 Php Vars Op Control Etc
02 Php Vars Op Control Etc
Geshan Manandhar
 
php 2 Function creating, calling, PHP built-in function
php 2 Function creating, calling,PHP built-in functionphp 2 Function creating, calling,PHP built-in function
php 2 Function creating, calling, PHP built-in function
tumetr1
 
Anonymous Functions in PHP 5.3 - Matthew Weier O’Phinney
Anonymous Functions in PHP 5.3 - Matthew Weier O’PhinneyAnonymous Functions in PHP 5.3 - Matthew Weier O’Phinney
Anonymous Functions in PHP 5.3 - Matthew Weier O’Phinney
Hipot Studio
 
A Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP GeneratorsA Functional Guide to Cat Herding with PHP Generators
A Functional Guide to Cat Herding with PHP Generators
Mark Baker
 
PHP 5.3 Overview
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
jsmith92
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with thisPHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali
 
PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021PHP Enums - PHPCon Japan 2021
PHP Enums - PHPCon Japan 2021
Ayesh Karunaratne
 
07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards
Denis Ristic
 
The promise of asynchronous PHP
The promise of asynchronous PHPThe promise of asynchronous PHP
The promise of asynchronous PHP
Wim Godden
 
Php Chapter 2 3 Training
Php Chapter 2 3 TrainingPhp Chapter 2 3 Training
Php Chapter 2 3 Training
Chris Chubb
 

Similar to Introduction to web and php mysql (20)

Php manish
Php manishPhp manish
Php manish
Manish Jain
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
vibrantuser
 
Basics PHP
Basics PHPBasics PHP
Basics PHP
Alokin Software Pvt Ltd
 
Php intro
Php introPhp intro
Php intro
Jennie Gajjar
 
Php intro
Php introPhp intro
Php intro
Jennie Gajjar
 
Php intro
Php introPhp intro
Php intro
Jennie Gajjar
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
SHARANBAJWA
 
PHP
PHPPHP
PHP
Jawhar Ali
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
wahidullah mudaser
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
Sleepy Head
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Muhamad Al Imran
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Muhamad Al Imran
 
unit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docxunit1 part 1 sem4 php.docx
unit1 part 1 sem4 php.docx
charvi parth Lastpatel
 
chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdf
burasyacob012
 
Php notes
Php notesPhp notes
Php notes
Muthuganesh S
 
PHP.pptx is the Best Explanation of ppts
PHP.pptx is the Best Explanation of pptsPHP.pptx is the Best Explanation of ppts
PHP.pptx is the Best Explanation of ppts
AkhileshPansare
 
php basics
php basicsphp basics
php basics
NIRMAL FELIX
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Roohul Amin
 
Make your application expressive
Make your application expressiveMake your application expressive
Make your application expressive
Christian Varela
 
Tml for Laravel
Tml for LaravelTml for Laravel
Tml for Laravel
Michael Berkovich
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
vibrantuser
 
Introduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHPIntroduction to PHP - Basics of PHP
Introduction to PHP - Basics of PHP
wahidullah mudaser
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Muhamad Al Imran
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Muhamad Al Imran
 
chapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdfchapter 5 Server-Side Scripting (PHP).pdf
chapter 5 Server-Side Scripting (PHP).pdf
burasyacob012
 
PHP.pptx is the Best Explanation of ppts
PHP.pptx is the Best Explanation of pptsPHP.pptx is the Best Explanation of ppts
PHP.pptx is the Best Explanation of ppts
AkhileshPansare
 
Make your application expressive
Make your application expressiveMake your application expressive
Make your application expressive
Christian Varela
 
Ad

Recently uploaded (20)

10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx
EphraimOOghodero
 
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
CartCoders
 
PPT 18.03.2023.pptx for i smart programme
PPT 18.03.2023.pptx for i smart programmePPT 18.03.2023.pptx for i smart programme
PPT 18.03.2023.pptx for i smart programme
AbhimanShastry
 
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
treyka
 
Cloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptxCloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptx
islamicknowledge5224
 
rosoft PowcgnggerPoint Presentation.pptx
rosoft PowcgnggerPoint Presentation.pptxrosoft PowcgnggerPoint Presentation.pptx
rosoft PowcgnggerPoint Presentation.pptx
sirbabu778
 
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
Taqyea
 
Unlocking Business Growth Through Targeted Social Engagement
Unlocking Business Growth Through Targeted Social EngagementUnlocking Business Growth Through Targeted Social Engagement
Unlocking Business Growth Through Targeted Social Engagement
Digital Guider
 
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animationUV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
17218
 
LpQuantueer rtwrt 1e erere errerqer m.ppt
LpQuantueer rtwrt 1e erere errerqer m.pptLpQuantueer rtwrt 1e erere errerqer m.ppt
LpQuantueer rtwrt 1e erere errerqer m.ppt
cyberesearchprof
 
Quantiuwewe e3er14e we3223 32222 m2.pptx
Quantiuwewe e3er14e we3223 32222 m2.pptxQuantiuwewe e3er14e we3223 32222 m2.pptx
Quantiuwewe e3er14e we3223 32222 m2.pptx
cyberesearchprof
 
In order to install and use the device software, your computer must meet the ...
In order to install and use the device software, your computer must meet the ...In order to install and use the device software, your computer must meet the ...
In order to install and use the device software, your computer must meet the ...
raguclc
 
How to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real TalkHow to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real Talk
Cam Sites Expert
 
AI theory work for students to understand the logic
AI theory work for students to understand the logicAI theory work for students to understand the logic
AI theory work for students to understand the logic
areeba15775n
 
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptxInter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
secretarysocom
 
Networking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptxNetworking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptx
elestirmen
 
Vigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptxVigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptx
secretarysocom
 
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your FeedbackICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
APNIC
 
Internet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptxInternet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptx
cshumerabashir
 
最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制
最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制
最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制
Taqyea
 
10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx10 Latest Technologies and Their Benefits to End.pptx
10 Latest Technologies and Their Benefits to End.pptx
EphraimOOghodero
 
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
What to Expect When Hiring Shopify Development Services_ A Technical Walkthro...
CartCoders
 
PPT 18.03.2023.pptx for i smart programme
PPT 18.03.2023.pptx for i smart programmePPT 18.03.2023.pptx for i smart programme
PPT 18.03.2023.pptx for i smart programme
AbhimanShastry
 
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
Darley - BSides Nairobi (2025-06-07) Epochalypse 2038 - Time is Not on Our Si...
treyka
 
Cloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptxCloud Computing - iCloud by Hamza Anwaar .pptx
Cloud Computing - iCloud by Hamza Anwaar .pptx
islamicknowledge5224
 
rosoft PowcgnggerPoint Presentation.pptx
rosoft PowcgnggerPoint Presentation.pptxrosoft PowcgnggerPoint Presentation.pptx
rosoft PowcgnggerPoint Presentation.pptx
sirbabu778
 
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
最新版西班牙加泰罗尼亚国际大学毕业证(UIC毕业证书)原版定制
Taqyea
 
Unlocking Business Growth Through Targeted Social Engagement
Unlocking Business Growth Through Targeted Social EngagementUnlocking Business Growth Through Targeted Social Engagement
Unlocking Business Growth Through Targeted Social Engagement
Digital Guider
 
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animationUV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
UV_Unwrapping_Lecture_with_Figures.pptx presentation for lecture of animation
17218
 
LpQuantueer rtwrt 1e erere errerqer m.ppt
LpQuantueer rtwrt 1e erere errerqer m.pptLpQuantueer rtwrt 1e erere errerqer m.ppt
LpQuantueer rtwrt 1e erere errerqer m.ppt
cyberesearchprof
 
Quantiuwewe e3er14e we3223 32222 m2.pptx
Quantiuwewe e3er14e we3223 32222 m2.pptxQuantiuwewe e3er14e we3223 32222 m2.pptx
Quantiuwewe e3er14e we3223 32222 m2.pptx
cyberesearchprof
 
In order to install and use the device software, your computer must meet the ...
In order to install and use the device software, your computer must meet the ...In order to install and use the device software, your computer must meet the ...
In order to install and use the device software, your computer must meet the ...
raguclc
 
How to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real TalkHow to Make Money as a Cam Model – Tips, Tools & Real Talk
How to Make Money as a Cam Model – Tips, Tools & Real Talk
Cam Sites Expert
 
AI theory work for students to understand the logic
AI theory work for students to understand the logicAI theory work for students to understand the logic
AI theory work for students to understand the logic
areeba15775n
 
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptxInter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
Inter-Mirifica-Navigating-Media-in-the-Modern-World.pptx
secretarysocom
 
Networking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptxNetworking_Essentials_version_3.0_-_Module_7.pptx
Networking_Essentials_version_3.0_-_Module_7.pptx
elestirmen
 
Vigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptxVigilanti-Cura-Protecting-the-Faith.pptx
Vigilanti-Cura-Protecting-the-Faith.pptx
secretarysocom
 
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your FeedbackICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
ICP -2 Review – What It Is, and How to Participate and Provide Your Feedback
APNIC
 
Internet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptxInternet_of_Things_Presentation_by-Humera.pptx
Internet_of_Things_Presentation_by-Humera.pptx
cshumerabashir
 
最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制
最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制
最新版英国北安普顿大学毕业证(UoN毕业证书)原版定制
Taqyea
 
Ad

Introduction to web and php mysql

  • 1. Introduction to World Wide Web and basics of PHP By http://programmerblog.net By Programmer Blog http://programmerblog.net/
  • 2. What is Internet and World Wide Web?  Internet – Global system of interconnected networks  It is a network of networks that consists of millions of private, public, academic, business, and government networks of local to global scope.  Use TCP/IP to serve billions of users worldwide.  Voice over Internet Protocol (VoIP) and IPTV. Newspaper publishing, blogging, and web feeds.  Human interactions through instant messaging, Internet forums, and social networking sites.  www – Collection of interconnected documents and other resources  System of interlinked hypertext documents contained on the Internet.  http – Hyper Text Transfer Protocol  Hyperlink (or link) is a reference to a document that the reader can directly follow.  Hypertext is text displayed with references (hyperlinks) to other text that the reader can immediately access  Protocol to transfer hypertext docs from server to client. ProgrammerBlog.Net http://programmerblog.net/
  • 3. Web Application Development  Web application development is the process and practice of developing web applications.  Request / Response Model  In HTTP, web browsers or spiders typically act as clients, while an application running on the computer hosting the web site acts as a server  Static vs. Dynamic web pages  Server Side Scripting Languages  J.S.P, ASP. Net Cold Fusion, Python, PHP ProgrammerBlog.Net http://programmerblog.net/
  • 4. W.A.M.P Installation  On windows WAMP or XAMPP can be installed  Web Server – Apache  Server Side Language – PHP  DBMS – MySql  PhpMyAdmin ProgrammerBlog.Net http://programmerblog.net/
  • 5. PHP History  Rasmus Lerdorf - Creator of PHP language  PHP - 1995 Collection of Perl/CGI scripts  PHP/FI was created by Rasmus Lerdorf in 1995, initially as a simple set of Perl scripts for tracking accesses to his online resume  PHP/FI - 1997 Form Interpreter  Rasmus wrote a much larger C implementation, which was able to communicate with databases, and enabled users to develop simple dynamic Web applications .  Personal Home Page / Forms Interpreter  PHP 3.0 June 1998  lots of different databases, protocols and APIs,  Developers joined in and submit new extension modules  PHP: Hypertext Preprocessor. ProgrammerBlog.Net http://programmerblog.net/
  • 6. PHP History  PHP 4  Zend Engine Introduced in 1999  Support for Web servers  Object Oriented Programming  PHP 5  Zend Engine 2.0  XML and Web Services  Object Oriented Support  Exception Handling  A lot of new Features ProgrammerBlog.Net http://programmerblog.net/
  • 7. PHP History PHP 7 – current version on PHP is latest version of PHP with lot of improvement. Some of new features are: 1. Speed 2. Type Declaration 3. Return Type Declarations 4. Error Handling 5. Spaceship Operator 6. Null Coalesce Operator 7. Unicode support for emoji and international characters. 8. Constant arrays using define() 9. Anonymous classes 10.Generator delegation ProgrammerBlog.Net http://programmerblog.net/
  • 8. Why PHP ?  Open Source – Linux – Apache - PHP - MySQL  One of top 5 most popular languages  Small – medium – enterprise level applications  Server Side Scripting  Command Line  Desktop Applications (PHP – GTK)  Available for Windows, Linux, Mac Many Web Servers – Apache, IIS, nginx, Lighthttpd  Relational / No SQL Databases MySql, Oracle, MSSQL, mongoDB, PostgreSql  Built in Support – Regex, XML and other functions math etc  Services – LDAP, POP3 and so on ProgrammerBlog.Net http://programmerblog.net/
  • 9. PHP – Online Popular Projects  PHP  Facebook - The world’s biggest social networking platform is written in PHP.  150 million users and counting, and in my experience, significantly faster and more stable than competing platforms written in other languages (e.g. MySpace).  Yahoo! - formerly the world’s largest search engine. Yahoo! makes use of PHP.  You Tube - the world’s biggest video sharing website uses PHP technology.  Wikipedia - User contributed web encyclopedia has PHP elements.  Digg.com Social news network.  Sourceforge.org The world's largest Open Source software development web site.  Flickr.com Online photo sharing and storing: ProgrammerBlog.Net http://programmerblog.net/
  • 10. PHP Configuration PHP.ini Php configuration file is read when php starts up. Values of different environment variables can be set in php.ini file. Some of the features are:  Execution time  File upload size and so on  Session paths  Upload file size  Short tags  Error reporting  Safe mode ProgrammerBlog.Net http://programmerblog.net/
  • 11. PHP Basics: Code Blocks  Standard Tags: <?php …… ?>  Short Tags: <?........ ?>  ASP Tags: <%.....%> (Removed from php 7.0)  Script Tags  <script language=“PHP”></script> (Removed from PHP 7.0) ProgrammerBlog.Net http://programmerblog.net/
  • 12. PHP Basics: Language Constructs  Constructs are elements that are built-into the language  echo  echo 10; Every statement ends with semi colon. ProgrammerBlog.Net http://programmerblog.net/
  • 13. PHP Basics: Comments Single Line Comments -  // this is a single line comment  # this is a single line comment Multi Line Comments - /* ….. */  /* This is a Multi line comment  */ ProgrammerBlog.Net http://programmerblog.net/
  • 14. PHP Basics: Data Types Scalar Data types  Integer (Signed)  String  Floating point  Boolean Composite  Arrays  Objects ProgrammerBlog.Net http://programmerblog.net/
  • 15. PHP Basics: Data Types Integer  echo 10; echo -123; echo 066; echo 0xFF; Floating Point  echo 10.2; echo 0.009;  echo 2E7; echo 1e2; ProgrammerBlog.Net http://programmerblog.net/
  • 16. PHP Basics: Data Types String  echo “ String in double quotes”; echo ‘ string in single quotes’; Boolean  True or False; Composite Data types  Arrays , Objects Null Resource ProgrammerBlog.Net http://programmerblog.net/
  • 17. PHP Basics: Variables PHP is a loosely typed language Variables are storage container in memory Variables are identified with $ sign Valid variables:  [a-zA-Z], numbers, underscores  Variable variable  contents of variable to reference a new variable ProgrammerBlog.Net http://programmerblog.net/
  • 18. PHP Basics: Variables Variables existence  Isset Destroying  unset Constants  define(“country", “United States"); ProgrammerBlog.Net http://programmerblog.net/
  • 19. PHP Basics: Operators operators are the catalysts of operations  Assignment Operators =  Arithmetic Operators + - / * %  String Operators .  Comparison Operators < > <= >= Ternary operator  Logical Operators && || ! XOR  Bitwise Operators | & XOR NOT  Error Control Operators  Incrementing/Decrementing Operators ++ --  Typeof ProgrammerBlog.Net http://programmerblog.net/
  • 20. Operators: Increment / Decrement  $a = 1;  // Assign the integer 1 to $a  echo $a++;  // Outputs 1, $a is now equal to 2  echo ++$a;  // Outputs 3, $a is now equal to 3  echo --$a;  // Outputs 2, $a is now equal to 2  echo $a--;  // Outputs 2, $a is now equal to 1 ProgrammerBlog.Net http://programmerblog.net/
  • 21. Operators: Arithmetic Operators Addition $a = 1 + 3.5; Subtraction $a = 4 - 2; Multiplication $a = 8 * 3; Division $a = 15 / 5; Modulus $a = 23 % 7; ProgrammerBlog.Net http://programmerblog.net/
  • 22. Concatenation - Assignment Operator $string = “PHP" . “MySql"; $string2 = “Zend"; $string .= $string2; echo $string; Will print: PHP MySql Zend ProgrammerBlog.Net http://programmerblog.net/
  • 23. PHP Basics: Operator Precedence  $x = 9 + 1 * 10  Expecting result 100 but getting 19 – Multiplication has higher precedence Highest Precedence * / % + - . < <= > >= && || And Xor Lowest precedence or ProgrammerBlog.Net http://programmerblog.net/
  • 24. PHP Basics: Escape Sequences  " Print the next character as a double quote, not a string closer  ' Print the next character as a single quote, not a string closer  n Print a new line character (remember our print statements?)  t Print a tab character  r Print a carriage return (not used very often)  $ Print the next character as a dollar, not as part of a variable  Print the next character as a backslash, not an escape character  $MyString = "This is an "escaped" string"; $MySingleString = 'This 'will' work'; $MyNonVariable = "I have $marks in my pocket"; $MyNewline = "This ends with a line returnn"; $MyFile = "c:windowssystem32myfile.txt"; ProgrammerBlog.Net http://programmerblog.net/
  • 25. PHP Basics: Control Structure -1  Control structures allow you to control the flow of your script if (expression1) { … } elseif (expression2) { … } else { … } ProgrammerBlog.Net http://programmerblog.net/
  • 26. PHP Basics: Control Structure -1 ternary operator  (condition) ? ’output’ : ’output’;  echo 10 == $x ? ’Yes’ : ’No’;  Equivalent in IF-Else if (10 == $x) { echo 'Yes'; } else { echo 'No'; } ProgrammerBlog.Net http://programmerblog.net/
  • 27. Control Structures – Switch statement  switch (n) { case label1: //code to be executed if n=label1; break; case label2: //code to be executed if n=label2; break; default: // if n is different from both label1 and label2; } ProgrammerBlog.Net http://programmerblog.net/
  • 28. PHP Basics: Loops  while - loops through a block of code while a specified condition is true  do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true  for - loops through a block of code a specified number of times  foreach - loops through a block of code for each element in an array ProgrammerBlog.Net http://programmerblog.net/
  • 29. PHP Basics: While Loop  while (condition) { code to be executed; }  $i=1; while($i<=5) { echo "The number is " . $i . "<br />"; $i++; } ProgrammerBlog.Net http://programmerblog.net/
  • 30. PHP Basics: Do While Loop  do { code to be executed; } while (condition);  $i=1; do { $i++; echo "The number is " . $i . "<br />"; } while ($i<=5); ProgrammerBlog.Net http://programmerblog.net/
  • 31. PHP Basics: For Loop  for (init; condition; increment) { code to be executed; }  for ($i=1; $i<=5; $i++) { echo "The number is " . $i . "<br />"; }  Break  Causes the loop to stop and program execution to begin at the statement immediately following the loop.  Continue  causes the iteration to be skipped ProgrammerBlog.Net http://programmerblog.net/
  • 32. ProgrammerBlog.Net http://programmerblog.net/ Thanks for reading For more articles and video tutorials please visit our Blog http://Programmer Blog