PHP Tutorial
PHP Tutorial
contents
Introduction
Variables, statements and operators
Conditional statements and loops
Arrays and functions
Using files, cookies and sessions
Introduction-PHP
PHP:
a widely used general-purpose scripting language that is especially
suited for web development and can be embedded into HTML
the main goal of the language is to allow web developers to write
dynamically generated web pages quickly
popular choice for data-driven web applications because of its
wide support for different database systems
PHP code is “embedded” inside a regular HTML document, and
is recognized and executed by the web server when the document
is requested through a browser
PHP code works independently of the user’s web browser
Is open-source server-side scripting language that’s both easy to
learn and extremely powerful to use- why so popular
Introduction-PHP
PHP:
is available free of charge on the Internet, for a variety of platforms
and architectures(linux, Win, Mac)
is an interpreted language
is server side scripting language
Server side scripts run on the web server, therefore, can be used to
access server resources, such as databases or external files, and
perform more sophisticated tasks than regular client-side scripting
The large majority of server-side scripts are related to either getting
information from the user and saving it somewhere(DB), or
retrieving information from somewhere(DB) and presenting it
Current version of PHP 5.0
Introduction-PHP
PHP features:
Simplicity
Portability
Open source
Speed
Extensibility
XML and DB support
PHP originally stood for “Personal Home Page Tools.”
When PHP 3.0 was released, it was changed into a recursive
acronym meaning “PHP: Hypertext Preprocessor”
Introduction-PHP
These are among the things you can do with server-side scripts
and an RDBMS:
Build a search engine that responds to user queries
Record user input provided through web forms and save it for
future reference
Create web sites that dynamically update themselves with new
content
Manage a blog (or more than one)
Process electronic payments and track customer orders
Build customized bar graphs, pie charts, and other statistical
reports from raw numeric data
Carry out online surveys and polls, and create reports of the results
Variables, statements and operators