1. PHP Introduction
PHP : Hypertext Preprocessor”
It is a widely-used open source general-purpose
scripting language that is especially suited for
web development and can be embedded into
HTML.
2. PHP Introduction
> PHP is a server-side scripting language
> PHP scripts are executed on the server
> PHP supports many databases (MySQL,
Informix, Oracle, Sybase, Solid, PostgreSQL,
Generic ODBC, etc.)
> PHP is open source software
> PHP is free to download and use
3. PHP Introduction
> PHP runs on different platforms (Windows,
Linux, Unix, etc.)
> PHP is compatible with almost all servers used
today (Apache, IIS, etc.)
> PHP is FREE to download from the official PHP
resource: www.php.net
> PHP is easy to learn and runs efficiently on the
server side
7. Installation
Text Editor
Web Server
https://notepad-plus-plus.org/downloads
https://www.apachefriends.org/index.html
8. PHP – Programming Concepts
Basic Syntax:
1. The PHP code is enclosed in special start and
end processing instructions <?php and ?>.
2. A PHP file is saved with the exrtension .php
3. It normally has HTML Tags, and some PHP
scripting code.
PHP code is executed on the server, generating
HTML which is then sent to the client. The client
would receive the results of running that script.
10. In Notepad++, Click File ->
Save
Save in htdocs folder in
XAMPP folder
Create a folder (test) and save
with .php extension
Open browser and use URL
https://localhost/text/hello.php
Execution Steps
11. PHP –Programming Concepts
This program is extremely simple and you really did not
need to use PHP to create a page like this. All it does is
display: Hello World using the PHP echo() statement.
Keywords:
12. PHP Comments
In PHP, we use // to
make a single-line
comment or /* and */ to
make a large comment
block.
13. PHP Variables
> Variables are used for storing values, like text
strings, numbers or arrays.
> When a variable is declared, it can be used over
and over again in your script.
> All variables in PHP start with a $ sign symbol.
Syntax: Example
14. PHP Operators
Operators are used to operate on values. There
are four classifications of operators:
> Arithmetic
> Assignment
> Comparison
> Logical
19. GET and POST Methods
There are two types of websites
The websites with multiple
web pages that share the
user data with each other
are known as Dynamic
Websites
The websites with static
data (the data in each web
page remains unhanged)
is called Static Website
20. 1. GET and POST methods are used by websites
to share user’s data among its web pages.
Therefore these methods are used to create
dynamic webpages.
2. GET & POST methods are the http request
methods used inside <form> tag to send data to
the server.
Syntax:
<form action=“web page address” method=“POST”>
23. 1.PHP-> Scripting Language to
create web applications
2. PHP require a web server
3. GET and POST methods are the
HTTP request methods used inside
<form> tag to send data to the
server.
Conclusion: