Más contenido relacionado Introduction to Dynamic Web Programming with PHP & MySQL2. Please..
Take Notes..
Ask Doubts..
Contribute your Knowledge..
Practice Privately..
© Introduction to PHP by Jose Philip Raja
3. What is PHP?
PHP stands
for PHP: Hypertext Preprocessor
(recursive acronym)
PHP is a widely-used, open source
scripting language
PHP scripts are executed on the
server
PHP is free to download and use
© Introduction to PHP by Jose Philip Raja
4. What is a PHP File?
PHP files can contain text, HTML,
JavaScript code, and PHP code
PHP code are executed on the server,
and the result is returned to the
browser as plain HTML
PHP files have a default file extension
of ".php"
© Introduction to PHP by Jose Philip Raja
5. What Can PHP Do?
PHP can generate dynamic page content
PHP can create, open, read, write, and
close files on the server
PHP can collect form data
PHP can send and receive cookies
PHP can add, delete, modify data in your
database
PHP can restrict users to access some
pages on your website
PHP can encrypt data
© Introduction to PHP by Jose Philip Raja
6. Why PHP?
PHP runs on different platforms
(Windows, Linux, Unix, Mac OS X, etc.)
PHP is compatible with almost all
servers used today (Apache, IIS, etc.)
PHP has support for a wide range of
databases
PHP is free. Download it from the official
PHP resource: www.php.net
PHP is easy to learn and runs efficiently
on the server side
© Introduction to PHP by Jose Philip Raja
8. PHP Basics
Syntax
Variables
String
Operators
If…Else
Switch
Arrays
While Loops
For Loops
Foreach
Functions
Classes
$_GET
$_POST
$_REQUEST
$_FILES
$_SERVER
$_SESSION
© Introduction to PHP by Jose Philip Raja
10. PHP Advanced
Multi – Array
Date
Include
File Upload
Cookies
Sessions
E-mail
Error Handling
© Introduction to PHP by Jose Philip Raja
12. What is MySQL?
MySQL is a database server
MySQL is ideal for both small and
large applications
MySQL supports standard SQL
MySQL is free to download and use
PHP combined with MySQL are cross-
platform
The data in MySQL is stored in
database objects called tables.
© Introduction to PHP by Jose Philip Raja
13. MySQL Connection
<?php
$con = mysql_connect("localhost","peter","abc");
if (!$con) {
die('Could not connect: ' . mysql_error());
}
// some code
mysql_close($con);
?>
© Introduction to PHP by Jose Philip Raja