SlideShare a Scribd company logo
1 of 35
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
PHP Training in Gandhinagar
Introduction to PHP
http://www.shreedhoon.com
PHP ReferencesPHP References
 General: Download, documentationGeneral: Download, documentation

http://www.php.net/http://www.php.net/
 Documentation: manualDocumentation: manual

http://www.php.net/manual/en/http://www.php.net/manual/en/
http://us2.php.net/manual/en/index.phphttp://us2.php.net/manual/en/index.php
 PHP.net tutorialPHP.net tutorial

http://php.net/manual/en/tutorial.phphttp://php.net/manual/en/tutorial.php
 W3schools tutorialW3schools tutorial
http://www.w3schools.com/php/default.asphttp://www.w3schools.com/php/default.asp
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
PHP functionsPHP functions
 Documented PHP functionsDocumented PHP functions

http://us2.php.net/quickref.phphttp://us2.php.net/quickref.php
 You can create your own functions tooYou can create your own functions too
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
ObjectivesObjectives
 What is PHP?What is PHP?
 How does a PHP script work with aHow does a PHP script work with a
Web Browser and a Web Server?Web Browser and a Web Server?
 What software and components youWhat software and components you
need to get started with PHP?need to get started with PHP?
 To create and run a simple PHP scriptTo create and run a simple PHP script
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
What Is PHP?What Is PHP?
 PHP, PHP Hypertext PreprocessorPHP, PHP Hypertext Preprocessor

Server-side scripting languages for creatingServer-side scripting languages for creating
dynamic web pagesdynamic web pages
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
PHP advantagesPHP advantages
Advantages of Using PHP to enhance WebAdvantages of Using PHP to enhance Web
pages:pages:

Easy to useEasy to use

Simpler than PerlSimpler than Perl

Open sourceOpen source

Multiple platform.Multiple platform.
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
How PHP Pages are AccessedHow PHP Pages are Accessed
and Interpretedand Interpreted
Client: Web browser Web server
1.Form submitted with a submit button
2.----- Action sends a request to the php file in server
3. Receive the request, find the file,
and read it
4. Execute the PHP commands
5. Send the results back
6. ---- results returned as HTML file
7. Web browser renders the HTML file, displaying the results
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Getting Started with PHPGetting Started with PHP
To develop and publish PHP scripts you need:To develop and publish PHP scripts you need:

A client machine with a basic text editor andA client machine with a basic text editor and
Internet connectionInternet connection
• Prepare a text file with .php extensionPrepare a text file with .php extension

FTP or Telnet softwareFTP or Telnet software
• Upload the file.php to the serverUpload the file.php to the server

A Web server with PHP built into itA Web server with PHP built into it
• Process the file.phpProcess the file.php
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
WHH NoteWHH Note
 This means that a browser e.g. IE orThis means that a browser e.g. IE or
Firefox on the client computer will notFirefox on the client computer will not
recognize or render a file with extensionrecognize or render a file with extension
.php.php
 How do you check your PHP script beforeHow do you check your PHP script before
submission to server?submission to server?
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
Getting Started with PHPGetting Started with PHP
Set up development computer as a serverSet up development computer as a server

Laptop contains a server and a browser environmentLaptop contains a server and a browser environment

Laptop is also set up as a Web server - WAMPserverLaptop is also set up as a Web server - WAMPserver
• Windows Apache, MySQL, PHPWindows Apache, MySQL, PHP

Client machine: PC, XP, editors, browsersClient machine: PC, XP, editors, browsers

Internet connection not neededInternet connection not needed

Use copy and paste to transfer the scriptsUse copy and paste to transfer the scripts
 For class demos:For class demos:

localhost or 127.0.0.1 or cs346 serverlocalhost or 127.0.0.1 or cs346 server
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Exploring the Basic PHPExploring the Basic PHP
Development ProcessDevelopment Process
The basic steps you can use to develop andThe basic steps you can use to develop and
publish PHP pages are:publish PHP pages are:
1. Create a PHP script file and save it to a local disk1. Create a PHP script file and save it to a local disk
• Test on localhost until satisfiedTest on localhost until satisfied
2. Use FTP to copy the file to the server2. Use FTP to copy the file to the server
3. Access your file via URL on server using a3. Access your file via URL on server using a
browserbrowser
• IE, Netscape, Opera, etc.IE, Netscape, Opera, etc.
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
Check PHP installationCheck PHP installation
 Create a simple PHP script, calledCreate a simple PHP script, called
phpinfo.phpphpinfo.php

The PHP script starts with a <?php tag andThe PHP script starts with a <?php tag and
ends with ?>ends with ?>

Between these tags is a single PHPBetween these tags is a single PHP
statement: phpinfo();statement: phpinfo();
 Copy the file to a directory of local serverCopy the file to a directory of local server

For WAMP: wamp/wwwFor WAMP: wamp/www
 Access the file with a browserAccess the file with a browser
 http://localhost/checkphp.phphttp://localhost/checkphp.php
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
Checking the server set upChecking the server set up
 Upload the phpinfo.php to cs346 serverUpload the phpinfo.php to cs346 server

E.g. to huen/m00E.g. to huen/m00
 Click on the linkClick on the link
 http://cs346.cs.uwosh.edu/huen/m00/phpinfo.phphttp://cs346.cs.uwosh.edu/huen/m00/phpinfo.php
 Check the various environments:Check the various environments:

ApacheApache

MySQLMySQL

PHP functionsPHP functions

variablesvariables
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Creating a PHP Script FileCreating a PHP Script File
 Create PHP script welcome.phpCreate PHP script welcome.php

Starts with a <?php tag and ends with ?>Starts with a <?php tag and ends with ?>

Between these tags is a single PHP printBetween these tags is a single PHP print
statementstatement
 Copy the file to C:wampwwwCopy the file to C:wampwww
 Access the file withAccess the file with
http://127.0.0.1/welcome.phphttp://127.0.0.1/welcome.php
 Demo on localhostDemo on localhost
 Demo on cs346 serverDemo on cs346 server
Similarly for other PHP scriptsSimilarly for other PHP scripts
 Upload welcome.php to huen/m00Upload welcome.php to huen/m00
 Click onClick on
 http://cs346.cs.uwosh.edu/huen/m00/welcome.phphttp://cs346.cs.uwosh.edu/huen/m00/welcome.php
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
<?PHP
/* welcome.php */
print ("<h1 style="color: blue;">Welcome to PHP, CS346 class!</h1>");
/* Note the combination of html tags and css */
?>
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Note the effect of CSS
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Alternative PHP DelimitersAlternative PHP Delimiters
 You can alternatively start your PHP scriptsYou can alternatively start your PHP scripts
with the <script> tag as follows:with the <script> tag as follows:
<script language="PHP"><script language="PHP">
print ("A simple initial script");print ("A simple initial script");
</script></script>
 IfIf short_open_tagshort_open_tag enabled in its configurationenabled in its configuration
file (php.ini), you can use <? and ?>.file (php.ini), you can use <? and ?>.
 If asp_tags is enabled in the PHPIf asp_tags is enabled in the PHP
configuration file, you can use <% and %>configuration file, you can use <% and %>
as delimiters.as delimiters.
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Proper SyntaxProper Syntax
 If you have aIf you have a syntax errorsyntax error then you havethen you have
written one or more PHP statements that arewritten one or more PHP statements that are
grammatically incorrect in the PHP language.grammatically incorrect in the PHP language.
 TheThe printprint statement syntax:statement syntax:
print ( "Your message to print" );
Enclose message
in quotation
marks
Message to Output
End in a
semi-colon
Parenthesis are
optional
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
If syntax is wrongIf syntax is wrong
<?php<?php
print ( "Welcome to PHP, CS346 class!);print ( "Welcome to PHP, CS346 class!);
?>?>
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
A Little About PHP's SyntaxA Little About PHP's Syntax
 Some PHP Syntax Issues:Some PHP Syntax Issues:

Be careful to use quotation marks, parentheses, andBe careful to use quotation marks, parentheses, and
brackets inbrackets in pairspairs..

Most PHP commands end with a semicolon (;).Most PHP commands end with a semicolon (;).

Be careful of case.Be careful of case.

PHP ignores blank spaces.PHP ignores blank spaces.
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Embedding PHP Statements WithinEmbedding PHP Statements Within
HTML DocumentsHTML Documents
 One way to use PHP is to embed PHP scriptsOne way to use PHP is to embed PHP scripts
within HTML tags in an HTML document.within HTML tags in an HTML document.
 Save the file first with extension htmlSave the file first with extension html
 Validate the html fileValidate the html file
 Change the extension to phpChange the extension to php
 Access the script by URL on serverAccess the script by URL on server
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
<html xmlns = "http://www.w3.org/1999/xhtml"><html xmlns = "http://www.w3.org/1999/xhtml">
<head><head>
<title>HTML With PHP Embedded </title><title>HTML With PHP Embedded </title>
</head></head>
<body><body>
<p style = "font-family:sans-serif; font-size:36;<p style = "font-family:sans-serif; font-size:36;
color:yellow; background-color:green">color:yellow; background-color:green">
Welcome To My Page!Welcome To My Page!
<?PHP<?PHP
print ("<br /> Using PHP is not hard!");print ("<br /> Using PHP is not hard!");
?>?>
<br /> and you can learn it quickly!</p><br /> and you can learn it quickly!</p>
</body></body>
</html></html>
vv
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
When embedded1.php is accessedWhen embedded1.php is accessed
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Using Backslash () to GenerateUsing Backslash () to Generate
HTML Tags with print()HTML Tags with print()
 Sometimes you want to output an HTML tagSometimes you want to output an HTML tag
that also requires double quotation marks.that also requires double quotation marks.

Use the backslash (“”) character to signal that theUse the backslash (“”) character to signal that the
double quotation marks themselves should bedouble quotation marks themselves should be
output:output:
print ("<font color="blue">");print ("<font color="blue">");

The above statement would output:The above statement would output:
<font color="blue"><font color="blue">
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Using Comments withUsing Comments with
PHP ScriptsPHP Scripts
 Comments enable you to includeComments enable you to include
descriptive text along with the PHPdescriptive text along with the PHP
script.script.

Comment lines are ignored when the scriptComment lines are ignored when the script
runs; they do not slow down the run-time.runs; they do not slow down the run-time.

Comments have two common uses.Comments have two common uses.
• Describe the overall script purpose.Describe the overall script purpose.
• Describe particularly tricky script lines.Describe particularly tricky script lines.
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Using Comments with PHP ScriptsUsing Comments with PHP Scripts
 Comment Syntax - Use //Comment Syntax - Use //
standalonestandalone
<?php<?php
// This is a comment// This is a comment
?>?>
 Can be placed on Same line as aCan be placed on Same line as a
statement:statement:
<?php<?php
print ("A simple initial script");print ("A simple initial script");
//Output a line//Output a line
?>?>
http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
Example Script with CommentsExample Script with Comments
1. <html> <head>1. <html> <head>
2. <title> Generating HTML From PHP</title> </head>2. <title> Generating HTML From PHP</title> </head>
3. <body> <h1> Generating HTML From PHP</h1>3. <body> <h1> Generating HTML From PHP</h1>
4. <?php4. <?php
5. //5. //
6. // Example script to output HTML tags6. // Example script to output HTML tags
7. //7. //
8. print ("Using PHP has <i>some advantages:</i>");8. print ("Using PHP has <i>some advantages:</i>");
9. print ("<ul><li>Speed</li><li>Ease of use</li>9. print ("<ul><li>Speed</li><li>Ease of use</li>
<li>Functionality</li></ul>"); //Output bullet list<li>Functionality</li></ul>"); //Output bullet list
10. print ("</body></html>");10. print ("</body></html>");
11. ?>11. ?>
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
Alternative Comment SyntaxAlternative Comment Syntax
PHP allows a couple of additional ways toPHP allows a couple of additional ways to
create comments.create comments.
<?php<?php
phpinfo(); # This is a built-in functionphpinfo(); # This is a built-in function
?>?>
 Multiple line comments.Multiple line comments.
<?php<?php
/*/*
A script that gets information about theA script that gets information about the
PHP version being used.PHP version being used.
*/*/
<? phpinfo(); ?><? phpinfo(); ?>
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
SummarySummary
 HTML pages are static and cannot interact withHTML pages are static and cannot interact with
usersusers
 PHP is a free, open source technology thatPHP is a free, open source technology that
enables documents to generate dynamicenables documents to generate dynamic
contentcontent
 PHP script has the extension of .phpPHP script has the extension of .php
 PHP script may be standalone orPHP script may be standalone or
 Can be embedded in an HTML documentCan be embedded in an HTML document
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
SummarySummary
 Resources needed for development:Resources needed for development:

Web server with built-in PHPWeb server with built-in PHP

a client machine with a basic text editor,a client machine with a basic text editor,
browser, and internet connectionsbrowser, and internet connections

FTP or Telnet software to send the script toFTP or Telnet software to send the script to
the serverthe server
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
SummarySummary
 PHP script process:PHP script process:

write the PHP script filewrite the PHP script file

copy the script file to the Web servercopy the script file to the Web server

access the file with a Web browseraccess the file with a Web browser
 Comments can be proceeded withComments can be proceeded with

two forward slashes (//)two forward slashes (//)

or #or #

or enclosed in /* and */or enclosed in /* and */
Contact usContact us
 Website:Website:
 www.shreedhoon.comwww.shreedhoon.com
 www.shreedhoon.com/training/index.phpwww.shreedhoon.com/training/index.php
 Blogs:Blogs:
 http://Dotnettrainingingandhinagar.blogspot.inhttp://Dotnettrainingingandhinagar.blogspot.in
 http://dotnettrainingingandhinagar.tumblr.com/http://dotnettrainingingandhinagar.tumblr.com/
 http://shreedhoontraining.weebly.com/http://shreedhoontraining.weebly.com/
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php
http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini
ng/index.phpng/index.php

More Related Content

Recently uploaded

Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 

Recently uploaded (20)

Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 

Featured

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Featured (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Php guide for beginner

  • 2. PHP ReferencesPHP References  General: Download, documentationGeneral: Download, documentation  http://www.php.net/http://www.php.net/  Documentation: manualDocumentation: manual  http://www.php.net/manual/en/http://www.php.net/manual/en/ http://us2.php.net/manual/en/index.phphttp://us2.php.net/manual/en/index.php  PHP.net tutorialPHP.net tutorial  http://php.net/manual/en/tutorial.phphttp://php.net/manual/en/tutorial.php  W3schools tutorialW3schools tutorial http://www.w3schools.com/php/default.asphttp://www.w3schools.com/php/default.asp http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
  • 3. PHP functionsPHP functions  Documented PHP functionsDocumented PHP functions  http://us2.php.net/quickref.phphttp://us2.php.net/quickref.php  You can create your own functions tooYou can create your own functions too http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
  • 4. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php ObjectivesObjectives  What is PHP?What is PHP?  How does a PHP script work with aHow does a PHP script work with a Web Browser and a Web Server?Web Browser and a Web Server?  What software and components youWhat software and components you need to get started with PHP?need to get started with PHP?  To create and run a simple PHP scriptTo create and run a simple PHP script
  • 5. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php What Is PHP?What Is PHP?  PHP, PHP Hypertext PreprocessorPHP, PHP Hypertext Preprocessor  Server-side scripting languages for creatingServer-side scripting languages for creating dynamic web pagesdynamic web pages
  • 6. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php PHP advantagesPHP advantages Advantages of Using PHP to enhance WebAdvantages of Using PHP to enhance Web pages:pages:  Easy to useEasy to use  Simpler than PerlSimpler than Perl  Open sourceOpen source  Multiple platform.Multiple platform.
  • 7. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php How PHP Pages are AccessedHow PHP Pages are Accessed and Interpretedand Interpreted Client: Web browser Web server 1.Form submitted with a submit button 2.----- Action sends a request to the php file in server 3. Receive the request, find the file, and read it 4. Execute the PHP commands 5. Send the results back 6. ---- results returned as HTML file 7. Web browser renders the HTML file, displaying the results
  • 8. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Getting Started with PHPGetting Started with PHP To develop and publish PHP scripts you need:To develop and publish PHP scripts you need:  A client machine with a basic text editor andA client machine with a basic text editor and Internet connectionInternet connection • Prepare a text file with .php extensionPrepare a text file with .php extension  FTP or Telnet softwareFTP or Telnet software • Upload the file.php to the serverUpload the file.php to the server  A Web server with PHP built into itA Web server with PHP built into it • Process the file.phpProcess the file.php
  • 9. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php WHH NoteWHH Note  This means that a browser e.g. IE orThis means that a browser e.g. IE or Firefox on the client computer will notFirefox on the client computer will not recognize or render a file with extensionrecognize or render a file with extension .php.php  How do you check your PHP script beforeHow do you check your PHP script before submission to server?submission to server?
  • 10. http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php Getting Started with PHPGetting Started with PHP Set up development computer as a serverSet up development computer as a server  Laptop contains a server and a browser environmentLaptop contains a server and a browser environment  Laptop is also set up as a Web server - WAMPserverLaptop is also set up as a Web server - WAMPserver • Windows Apache, MySQL, PHPWindows Apache, MySQL, PHP  Client machine: PC, XP, editors, browsersClient machine: PC, XP, editors, browsers  Internet connection not neededInternet connection not needed  Use copy and paste to transfer the scriptsUse copy and paste to transfer the scripts  For class demos:For class demos:  localhost or 127.0.0.1 or cs346 serverlocalhost or 127.0.0.1 or cs346 server
  • 11. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Exploring the Basic PHPExploring the Basic PHP Development ProcessDevelopment Process The basic steps you can use to develop andThe basic steps you can use to develop and publish PHP pages are:publish PHP pages are: 1. Create a PHP script file and save it to a local disk1. Create a PHP script file and save it to a local disk • Test on localhost until satisfiedTest on localhost until satisfied 2. Use FTP to copy the file to the server2. Use FTP to copy the file to the server 3. Access your file via URL on server using a3. Access your file via URL on server using a browserbrowser • IE, Netscape, Opera, etc.IE, Netscape, Opera, etc.
  • 12. http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php Check PHP installationCheck PHP installation  Create a simple PHP script, calledCreate a simple PHP script, called phpinfo.phpphpinfo.php  The PHP script starts with a <?php tag andThe PHP script starts with a <?php tag and ends with ?>ends with ?>  Between these tags is a single PHPBetween these tags is a single PHP statement: phpinfo();statement: phpinfo();  Copy the file to a directory of local serverCopy the file to a directory of local server  For WAMP: wamp/wwwFor WAMP: wamp/www  Access the file with a browserAccess the file with a browser  http://localhost/checkphp.phphttp://localhost/checkphp.php
  • 14. Checking the server set upChecking the server set up  Upload the phpinfo.php to cs346 serverUpload the phpinfo.php to cs346 server  E.g. to huen/m00E.g. to huen/m00  Click on the linkClick on the link  http://cs346.cs.uwosh.edu/huen/m00/phpinfo.phphttp://cs346.cs.uwosh.edu/huen/m00/phpinfo.php  Check the various environments:Check the various environments:  ApacheApache  MySQLMySQL  PHP functionsPHP functions  variablesvariables http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php
  • 16. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Creating a PHP Script FileCreating a PHP Script File  Create PHP script welcome.phpCreate PHP script welcome.php  Starts with a <?php tag and ends with ?>Starts with a <?php tag and ends with ?>  Between these tags is a single PHP printBetween these tags is a single PHP print statementstatement  Copy the file to C:wampwwwCopy the file to C:wampwww  Access the file withAccess the file with http://127.0.0.1/welcome.phphttp://127.0.0.1/welcome.php  Demo on localhostDemo on localhost  Demo on cs346 serverDemo on cs346 server
  • 17. Similarly for other PHP scriptsSimilarly for other PHP scripts  Upload welcome.php to huen/m00Upload welcome.php to huen/m00  Click onClick on  http://cs346.cs.uwosh.edu/huen/m00/welcome.phphttp://cs346.cs.uwosh.edu/huen/m00/welcome.php http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php <?PHP /* welcome.php */ print ("<h1 style="color: blue;">Welcome to PHP, CS346 class!</h1>"); /* Note the combination of html tags and css */ ?>
  • 19. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Alternative PHP DelimitersAlternative PHP Delimiters  You can alternatively start your PHP scriptsYou can alternatively start your PHP scripts with the <script> tag as follows:with the <script> tag as follows: <script language="PHP"><script language="PHP"> print ("A simple initial script");print ("A simple initial script"); </script></script>  IfIf short_open_tagshort_open_tag enabled in its configurationenabled in its configuration file (php.ini), you can use <? and ?>.file (php.ini), you can use <? and ?>.  If asp_tags is enabled in the PHPIf asp_tags is enabled in the PHP configuration file, you can use <% and %>configuration file, you can use <% and %> as delimiters.as delimiters.
  • 20. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Proper SyntaxProper Syntax  If you have aIf you have a syntax errorsyntax error then you havethen you have written one or more PHP statements that arewritten one or more PHP statements that are grammatically incorrect in the PHP language.grammatically incorrect in the PHP language.  TheThe printprint statement syntax:statement syntax: print ( "Your message to print" ); Enclose message in quotation marks Message to Output End in a semi-colon Parenthesis are optional
  • 21. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php If syntax is wrongIf syntax is wrong <?php<?php print ( "Welcome to PHP, CS346 class!);print ( "Welcome to PHP, CS346 class!); ?>?>
  • 22. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php A Little About PHP's SyntaxA Little About PHP's Syntax  Some PHP Syntax Issues:Some PHP Syntax Issues:  Be careful to use quotation marks, parentheses, andBe careful to use quotation marks, parentheses, and brackets inbrackets in pairspairs..  Most PHP commands end with a semicolon (;).Most PHP commands end with a semicolon (;).  Be careful of case.Be careful of case.  PHP ignores blank spaces.PHP ignores blank spaces.
  • 23. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Embedding PHP Statements WithinEmbedding PHP Statements Within HTML DocumentsHTML Documents  One way to use PHP is to embed PHP scriptsOne way to use PHP is to embed PHP scripts within HTML tags in an HTML document.within HTML tags in an HTML document.  Save the file first with extension htmlSave the file first with extension html  Validate the html fileValidate the html file  Change the extension to phpChange the extension to php  Access the script by URL on serverAccess the script by URL on server
  • 24. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php <html xmlns = "http://www.w3.org/1999/xhtml"><html xmlns = "http://www.w3.org/1999/xhtml"> <head><head> <title>HTML With PHP Embedded </title><title>HTML With PHP Embedded </title> </head></head> <body><body> <p style = "font-family:sans-serif; font-size:36;<p style = "font-family:sans-serif; font-size:36; color:yellow; background-color:green">color:yellow; background-color:green"> Welcome To My Page!Welcome To My Page! <?PHP<?PHP print ("<br /> Using PHP is not hard!");print ("<br /> Using PHP is not hard!"); ?>?> <br /> and you can learn it quickly!</p><br /> and you can learn it quickly!</p> </body></body> </html></html>
  • 26. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Using Backslash () to GenerateUsing Backslash () to Generate HTML Tags with print()HTML Tags with print()  Sometimes you want to output an HTML tagSometimes you want to output an HTML tag that also requires double quotation marks.that also requires double quotation marks.  Use the backslash (“”) character to signal that theUse the backslash (“”) character to signal that the double quotation marks themselves should bedouble quotation marks themselves should be output:output: print ("<font color="blue">");print ("<font color="blue">");  The above statement would output:The above statement would output: <font color="blue"><font color="blue">
  • 27. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Using Comments withUsing Comments with PHP ScriptsPHP Scripts  Comments enable you to includeComments enable you to include descriptive text along with the PHPdescriptive text along with the PHP script.script.  Comment lines are ignored when the scriptComment lines are ignored when the script runs; they do not slow down the run-time.runs; they do not slow down the run-time.  Comments have two common uses.Comments have two common uses. • Describe the overall script purpose.Describe the overall script purpose. • Describe particularly tricky script lines.Describe particularly tricky script lines.
  • 28. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Using Comments with PHP ScriptsUsing Comments with PHP Scripts  Comment Syntax - Use //Comment Syntax - Use // standalonestandalone <?php<?php // This is a comment// This is a comment ?>?>  Can be placed on Same line as aCan be placed on Same line as a statement:statement: <?php<?php print ("A simple initial script");print ("A simple initial script"); //Output a line//Output a line ?>?>
  • 29. http://www.shreedhoon.com/training/index.phphttp://www.shreedhoon.com/training/index.php Example Script with CommentsExample Script with Comments 1. <html> <head>1. <html> <head> 2. <title> Generating HTML From PHP</title> </head>2. <title> Generating HTML From PHP</title> </head> 3. <body> <h1> Generating HTML From PHP</h1>3. <body> <h1> Generating HTML From PHP</h1> 4. <?php4. <?php 5. //5. // 6. // Example script to output HTML tags6. // Example script to output HTML tags 7. //7. // 8. print ("Using PHP has <i>some advantages:</i>");8. print ("Using PHP has <i>some advantages:</i>"); 9. print ("<ul><li>Speed</li><li>Ease of use</li>9. print ("<ul><li>Speed</li><li>Ease of use</li> <li>Functionality</li></ul>"); //Output bullet list<li>Functionality</li></ul>"); //Output bullet list 10. print ("</body></html>");10. print ("</body></html>"); 11. ?>11. ?>
  • 30. http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php Alternative Comment SyntaxAlternative Comment Syntax PHP allows a couple of additional ways toPHP allows a couple of additional ways to create comments.create comments. <?php<?php phpinfo(); # This is a built-in functionphpinfo(); # This is a built-in function ?>?>  Multiple line comments.Multiple line comments. <?php<?php /*/* A script that gets information about theA script that gets information about the PHP version being used.PHP version being used. */*/ <? phpinfo(); ?><? phpinfo(); ?>
  • 31. http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php SummarySummary  HTML pages are static and cannot interact withHTML pages are static and cannot interact with usersusers  PHP is a free, open source technology thatPHP is a free, open source technology that enables documents to generate dynamicenables documents to generate dynamic contentcontent  PHP script has the extension of .phpPHP script has the extension of .php  PHP script may be standalone orPHP script may be standalone or  Can be embedded in an HTML documentCan be embedded in an HTML document
  • 32. http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php SummarySummary  Resources needed for development:Resources needed for development:  Web server with built-in PHPWeb server with built-in PHP  a client machine with a basic text editor,a client machine with a basic text editor, browser, and internet connectionsbrowser, and internet connections  FTP or Telnet software to send the script toFTP or Telnet software to send the script to the serverthe server
  • 33. http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php SummarySummary  PHP script process:PHP script process:  write the PHP script filewrite the PHP script file  copy the script file to the Web servercopy the script file to the Web server  access the file with a Web browseraccess the file with a Web browser  Comments can be proceeded withComments can be proceeded with  two forward slashes (//)two forward slashes (//)  or #or #  or enclosed in /* and */or enclosed in /* and */
  • 34. Contact usContact us  Website:Website:  www.shreedhoon.comwww.shreedhoon.com  www.shreedhoon.com/training/index.phpwww.shreedhoon.com/training/index.php  Blogs:Blogs:  http://Dotnettrainingingandhinagar.blogspot.inhttp://Dotnettrainingingandhinagar.blogspot.in  http://dotnettrainingingandhinagar.tumblr.com/http://dotnettrainingingandhinagar.tumblr.com/  http://shreedhoontraining.weebly.com/http://shreedhoontraining.weebly.com/ http://www.shreedhoon.com/trainihttp://www.shreedhoon.com/traini ng/index.phpng/index.php