SlideShare a Scribd company logo
Hypertext Preprocessor
Content 
HTML 
Javascript 
PHP 
MySQL 
XAMPP/WAMP
HTML 
Hyper Text Markup Language 
Developed by Tim Berners Lee in 1990 
Easy to use, Easy to learn 
Markup Tags tell the browser how to display the 
page 
A HTML file must have an extension .htm or .html
Structure of HTML
JavaScript 
Developed by Netscape 
Starts with <script type=“text/java 
script”></script> 
Easy to use, Easy to learn 
Client Side Scripting
About PHP 
PHP (Hypertext Preprocessor) 
Dynamic Webpages 
Its like ASP 
Server Side Scripting 
PHP starts with <?php ?> or <? ?>
Structure of PHP Program 
<html> 
<body> 
<?php 
echo “hi friends….."; 
?> 
</body> 
</html>
Working of PHP
PHP Basics 
• SYNTAX: 
PHP Basics includes: 
1) CONSTANTS: 
o Named with capital letters. 
o Must begin with a letter or underscore . 
o Cannot begin with a number. 
o Case-sensitive. 
Eg: define (“FAVMOVIE”, “The Life of Brian”);
2) VARIABLES: 
o Prefixed with a dollar symbol. 
o Type not to be specified. 
o Variable name should not have spaces, dot or dashes but 
underscore can be there. 
o They need to be declared before adding a value to it. 
Example: $s = “SR”; 
3) DATATYPES: 
o String 
o Integer 
o Boolean 
o Float 
o Object 
o Resources
4) OPERATORS and OPERANDS: 
Operands are the entities that have some values in them. The 
operators are used to compare the two conditions . 
5) COMMENTS: 
// A comment on a single line 
/* Multi-line comment */ 
6) DISPLAY STATEMENTS: 
<?php echo "I like About" ?> 
<?php print "I like About" ?> 
7) ARRAYS: 
It holds a string of related data.
8) CONDITIONAL STATEMENTS: 
It allows our program to make choices. 
9) LOOPS: 
When we want the same block of code to run over & over again 
in a sequence. 
• while - loops through a block of code while the 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 
10) FUNCTIONS: 
A function is something that performs a specific task.
Passing Variables between pages 
There are four ways to do it. 
1) Passing Variables Through a URL: 
Values are passed through query string. 
echo “<a href=’http://localhost/2.php?favmovie=ddlj’> Click here 
</a>”; 
Disadvantages: 
• ❑ Everyone can see the values of the variables. 
• ❑ The user can change the variable value in the URL, which 
can lead to inconsistency of data.
2) Passing Variables Through Session: 
A Session is a temporary set of variables that exists 
only until the browser has shut down. 
• Every session is assigned a unique session ID, 
which keeps all the current information together. 
• To begin a session: session_start(). It must be 
used at the beginning of every page. 
3) Passing Variables Through Cookie: 
Cookies are tiny bits of information stored on 
Website’s visitor’s computer. 
• The advantage to storing information in a cookie 
versus a session is longevity. 
• To set a cookie: 
setcookie(name, value, expire, path, domain);
4) Passing Variables Through Forms: 
• Forms allow Web site to be truly interactive. 
• Forms are coded in HTML and stay in HTML. 
• A form is made up of four parts: 
o Opening tag line, indicated by <FORM> tag. 
o Content of the form, including input fields. 
 Text 
 Checkbox 
 Radio 
 Options 
 Password 
o Action button(s) or images typically submit/clear 
or user-defined button. 
o Closing tag line, indicated with </FORM> tag.
MySql 
Popular Open Source Database Server 
Define Structure for storing information 
We can query a database for specific 
information and have a recordset returned
XAMPP/WAMP 
Personal Web Server 
An integration package containing a number of 
useful packages that makes it easy to host 
websites on various platforms
Thank You

More Related Content

What's hot

PHP Variables and scopes
PHP Variables and scopesPHP Variables and scopes
PHP Variables and scopes
sana mateen
 
PHP Loops and PHP Forms
PHP  Loops and PHP FormsPHP  Loops and PHP Forms
PHP Loops and PHP Forms
M.Zalmai Rahmani
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processorSiddique Ibrahim
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
Taha Malampatti
 
Wt unit 4
Wt unit 4Wt unit 4
Wt unit 4
team11vgnt
 
PHP Function
PHP Function PHP Function
PHP Function
Reber Novanta
 
Php 5.5
Php 5.5Php 5.5
Php 5.5
Naseer Ahmad
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
team11vgnt
 
Loops PHP 04
Loops PHP 04Loops PHP 04
Loops PHP 04
Spy Seat
 
Php basics
Php basicsPhp basics
Php basics
Egerton University
 
Php advance
Php advancePhp advance
Php advance
Rattanjeet Singh
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
Alan Pinstein
 
How PHP works
How PHP works How PHP works
Php tutorial
Php tutorialPhp tutorial
Php tutorialNiit
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorialalexjones89
 

What's hot (20)

PHP Variables and scopes
PHP Variables and scopesPHP Variables and scopes
PHP Variables and scopes
 
PHP Loops and PHP Forms
PHP  Loops and PHP FormsPHP  Loops and PHP Forms
PHP Loops and PHP Forms
 
Php hypertext pre-processor
Php   hypertext pre-processorPhp   hypertext pre-processor
Php hypertext pre-processor
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Wt unit 4
Wt unit 4Wt unit 4
Wt unit 4
 
PHP Function
PHP Function PHP Function
PHP Function
 
Php 5.5
Php 5.5Php 5.5
Php 5.5
 
Php presentation
Php presentationPhp presentation
Php presentation
 
Wt unit 3
Wt unit 3 Wt unit 3
Wt unit 3
 
Php Presentation
Php PresentationPhp Presentation
Php Presentation
 
php basics
php basicsphp basics
php basics
 
Php introduction
Php introductionPhp introduction
Php introduction
 
Loops PHP 04
Loops PHP 04Loops PHP 04
Loops PHP 04
 
Php basics
Php basicsPhp basics
Php basics
 
Php advance
Php advancePhp advance
Php advance
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
How PHP works
How PHP works How PHP works
How PHP works
 
Php tutorial
Php tutorialPhp tutorial
Php tutorial
 
Beginners PHP Tutorial
Beginners PHP TutorialBeginners PHP Tutorial
Beginners PHP Tutorial
 
php
phpphp
php
 

Similar to Php

Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1
Mohd Harris Ahmad Jaal
 
Php unit i
Php unit iPhp unit i
Php unit i
BagavathiLakshmi
 
introduction to server-side scripting
introduction to server-side scriptingintroduction to server-side scripting
introduction to server-side scripting
Amirul Shafeeq
 
Php
PhpPhp
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehookPHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
Brainware Consultancy Pvt Ltd
 
Php intro
Php introPhp intro
Php intro
Jennie Gajjar
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and Javascript
Pradip Shrestha
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
KIRAN KUMAR SILIVERI
 
PHP language presentation
PHP language presentationPHP language presentation
PHP language presentation
Annujj Agrawaal
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptx
Stefan Oprea
 
Php reports sumit
Php reports sumitPhp reports sumit
Php reports sumit
Sumit Biswas
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
Robby Firmansyah
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
Sleepy Head
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
SherinRappai
 
Server Scripting Language -PHP
Server Scripting Language -PHPServer Scripting Language -PHP
Server Scripting Language -PHP
Deo Shao
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
Roohul Amin
 
INTRODUCTION TO PHP.ppt
INTRODUCTION TO PHP.pptINTRODUCTION TO PHP.ppt
INTRODUCTION TO PHP.ppt
WASIYANILOFARDPSNACH
 

Similar to Php (20)

Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1Web Application Development using PHP Chapter 1
Web Application Development using PHP Chapter 1
 
Php unit i
Php unit iPhp unit i
Php unit i
 
introduction to server-side scripting
introduction to server-side scriptingintroduction to server-side scripting
introduction to server-side scripting
 
Php
PhpPhp
Php
 
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehookPHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Php intro
Php introPhp intro
Php intro
 
Presentation on php and Javascript
Presentation on php and JavascriptPresentation on php and Javascript
Presentation on php and Javascript
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
PHP language presentation
PHP language presentationPHP language presentation
PHP language presentation
 
Web technologies-course 07.pptx
Web technologies-course 07.pptxWeb technologies-course 07.pptx
Web technologies-course 07.pptx
 
Php reports sumit
Php reports sumitPhp reports sumit
Php reports sumit
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
 
PHP ITCS 323
PHP ITCS 323PHP ITCS 323
PHP ITCS 323
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
 
Server Scripting Language -PHP
Server Scripting Language -PHPServer Scripting Language -PHP
Server Scripting Language -PHP
 
Php Basics
Php BasicsPhp Basics
Php Basics
 
PHP Basics
PHP BasicsPHP Basics
PHP Basics
 
INTRODUCTION TO PHP.ppt
INTRODUCTION TO PHP.pptINTRODUCTION TO PHP.ppt
INTRODUCTION TO PHP.ppt
 

Recently uploaded

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
Pavel ( NSTU)
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
chanes7
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Digital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion DesignsDigital Artifact 2 - Investigating Pavilion Designs
Digital Artifact 2 - Investigating Pavilion Designs
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Lapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdfLapbook sobre os Regimes Totalitários.pdf
Lapbook sobre os Regimes Totalitários.pdf
 

Php

  • 2. Content HTML Javascript PHP MySQL XAMPP/WAMP
  • 3. HTML Hyper Text Markup Language Developed by Tim Berners Lee in 1990 Easy to use, Easy to learn Markup Tags tell the browser how to display the page A HTML file must have an extension .htm or .html
  • 5. JavaScript Developed by Netscape Starts with <script type=“text/java script”></script> Easy to use, Easy to learn Client Side Scripting
  • 6. About PHP PHP (Hypertext Preprocessor) Dynamic Webpages Its like ASP Server Side Scripting PHP starts with <?php ?> or <? ?>
  • 7. Structure of PHP Program <html> <body> <?php echo “hi friends….."; ?> </body> </html>
  • 9. PHP Basics • SYNTAX: PHP Basics includes: 1) CONSTANTS: o Named with capital letters. o Must begin with a letter or underscore . o Cannot begin with a number. o Case-sensitive. Eg: define (“FAVMOVIE”, “The Life of Brian”);
  • 10. 2) VARIABLES: o Prefixed with a dollar symbol. o Type not to be specified. o Variable name should not have spaces, dot or dashes but underscore can be there. o They need to be declared before adding a value to it. Example: $s = “SR”; 3) DATATYPES: o String o Integer o Boolean o Float o Object o Resources
  • 11. 4) OPERATORS and OPERANDS: Operands are the entities that have some values in them. The operators are used to compare the two conditions . 5) COMMENTS: // A comment on a single line /* Multi-line comment */ 6) DISPLAY STATEMENTS: <?php echo "I like About" ?> <?php print "I like About" ?> 7) ARRAYS: It holds a string of related data.
  • 12. 8) CONDITIONAL STATEMENTS: It allows our program to make choices. 9) LOOPS: When we want the same block of code to run over & over again in a sequence. • while - loops through a block of code while the 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 10) FUNCTIONS: A function is something that performs a specific task.
  • 13. Passing Variables between pages There are four ways to do it. 1) Passing Variables Through a URL: Values are passed through query string. echo “<a href=’http://localhost/2.php?favmovie=ddlj’> Click here </a>”; Disadvantages: • ❑ Everyone can see the values of the variables. • ❑ The user can change the variable value in the URL, which can lead to inconsistency of data.
  • 14. 2) Passing Variables Through Session: A Session is a temporary set of variables that exists only until the browser has shut down. • Every session is assigned a unique session ID, which keeps all the current information together. • To begin a session: session_start(). It must be used at the beginning of every page. 3) Passing Variables Through Cookie: Cookies are tiny bits of information stored on Website’s visitor’s computer. • The advantage to storing information in a cookie versus a session is longevity. • To set a cookie: setcookie(name, value, expire, path, domain);
  • 15. 4) Passing Variables Through Forms: • Forms allow Web site to be truly interactive. • Forms are coded in HTML and stay in HTML. • A form is made up of four parts: o Opening tag line, indicated by <FORM> tag. o Content of the form, including input fields.  Text  Checkbox  Radio  Options  Password o Action button(s) or images typically submit/clear or user-defined button. o Closing tag line, indicated with </FORM> tag.
  • 16. MySql Popular Open Source Database Server Define Structure for storing information We can query a database for specific information and have a recordset returned
  • 17. XAMPP/WAMP Personal Web Server An integration package containing a number of useful packages that makes it easy to host websites on various platforms