0% found this document useful (0 votes)
15 views4 pages

Web Prog Reviewer!

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Web Prog Reviewer!

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

WEB PROG REVIEWER

WHAT IS PHP

- PHP (recursive acronym for


PHP: Hypertext
Preprocessor ) is a widely-
used open source general-
purpose scripting language
that is especially suited for
web development and can be
embedded into HTML.

What You Should Already Know Why PHP?


HTML - runs on various platforms
- Hypertext Markup (Windows, Linux, Unix,
Language Mac OS X,
etc.)
CSS - to support wide range of
- Cascading Style Sheets data bases

JAVASCRIPT (OPTIONAL)

- Javascript

WHAT IS A PHP FILE?

- contain text, HTML, CSS,


JavaScript, and PHP code - is free.
- have an extension “.php” Download it from
WHAT CAN PHP DO? the official PHP
resource:
- Can generate dynamic www.php.net
page content
- Can collect form data WHAT DO I
- Can use to control people NEED?
access - To begin using PHP, you
- Can encrypt data can:
- Choose a web host that
offers PHP and
- MySQL support. (Xampp,
Wampp etc.)
- Set up a web server on
your local -
computer and install PHP
and MySQL.

PHP SYNTAX

- A PHP script is executed on


the
server, and the plain HTML
result is
sent back to the browser.

BASIC SYNTAX
PHP CASE
- A PHP script can be SENSITIVITY
embedded
anywhere within the In PHP, keywords
document. - (such as if, else, while, echo,
- A PHP script begins with <? etc.),
php and classes, functions, and user-
concludes with ?> defined
- functions are not case-
sensitive.
- Example: ECHO is the same
as echo:

PHP VARIABLES

- Variables in PHP act as


"containers" for holding
information.
- Creating (Declaring) PHP
PHP FILE EXTENSION Variables In PHP, a variable is
introduced with the $ sign,
- The default file followed by the variable's
extension for name:
PHP files is
".php".
- A PHP file typically includes
both
HTML tags and PHP scripting
code.
- In the example above, the  The PHP echo statement is
variable $x will hold the often used to output
value 5, and the variable $y data to the screen.
will hold the value "CCST".
 The following example will
- Note: When you assign a text
show how to output
value to a variable, put
text and a variable:
quotes
around the value.

PHP VARIABLES

A variable can have a short name


(like $x and $y) or a
more descriptive name ($age, SUM OF TWO VARIABLES
$carname,
$total_volume).

Rules for PHP variables:

 A variable starts with


the $ sign, followed by the
name of the variable

 A variable name must start


with a letter or the VARIABLE TYPES
underscore character

 A variable name cannot  PHP has no command for


start with a number declaring a variable, and
 A variable name can only the data type depends on the
contain alpha-numeric value of the variable.
characters and underscores
(A-z, 0-9, and _ )

 Variable names are case-


sensitive ($age and $AGE are
two different variables)

PHP OUTPUT VARIABLES

You might also like