Introduction To PHP7 CH 1 4
Introduction To PHP7 CH 1 4
PHP&SQL
PHP supports many databases (MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
What is PHP?
01 PHP stands for PHP: Hypertext 02 PHP is a server-side scripting language, like
Preprocessor ASP
03 PHP scripts are executed on the server 04 PHP is an open source software is free to
DTD download and use
05
PHP supports many databases (MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic
ODBC, etc.)
PHP&SQL
What is PHP File?
01 PHP files can contain text, HTML tags and
scripts
03
PHP files have a file extension of ".php", ".php3",
or ".phtml"
PHP&SQL
What is MySQL?
What is MYSQL?
01 MySQL is a database server. 02 MySQL compiles on several platforms
03
MySQL is ideal for both small and large 04 MySQL supports standard SQL. MySQL
DTD
applications and use compiles on a number of platforms
PHP&SQL
Sending Data to the
Browser
//Using print
<?php
print 'Hello, world!';
print "What's new?";
?>
PHP&SQL
Writing
Comments
01 02 03
The first uses what’s The second uses two third style allows
called the pound, hash, or slashes: comments to run over
number: multiple lines:
A /*This is a longer
# This is a comment. // This is also a comment
comment. that spans two
lines. */
What are Variables
What are variables
Variables are containers used to temporarily store values.
In
The first character after the dollar sign must be either a letter
or an underscore (it cannot be a number).
?>
Operators
The Different operators used in PHP are:
+ , - , *, / , %, ++,-- &&,||,!
Arithmetic Logical
Operators Operators
?>
Single vs. Double
Quotation Marks
In PHP, it’s important to understand how single quotation marks
differ from double quotation marks. With echo and print, or when
assigning values to strings, you can use either, as in the examples
used so far. But there is a key difference between the two types
of quotation marks and when you should use which. You’ve seen
this difference already, but it’s an important enough concept to
merit more discussion.
<?php # Script 1.10 - quotes.php
?>
Review on the Topics
Discussed:
01 What tags are used to surround PHP 02 What extension should a PHP file have?
code? What does a page’s encoding refer to? like
ASP
03 What PHP functions, or language constructs, 04 How does using single versus double
can you use to send data to the browser? quotation marks differ in creating or printing
strings?
What character do all variable names begin 06 What is the operator?
05
with? What characters can come next? What
other characters can be used in a variable’s
name?Pupports many databases (MySQL, Informix,
Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
07 What is the concatenation operator? What is
PHP&SQL
the concatenation assignment operator?PHP
supports many databases (MySQL, Informix, Oracle,
Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
The End
Insert the Subtitle of Your Presentation