Académique Documents
Professionnel Documents
Culture Documents
PREPROCESSOR
Jan Carlo Arroyo
What is PHP?
Server-Side Scripting Language
Works with HTML
Provides more flexibility than HTML
Syntax is similar to C and Perl
Why Use PHP?
Open Source / Free software
Cross Platform to develop, deploy and use
Powerful, robust, scalable
Web development specific
Can be Object Oriented
Has a lot of documentations
www.php.net
Large Community
What do you need?
Web Server (Apache)
PHP (language)
Text Editor (Notepad++ / Dreamweaver)
Web Browser (Google Chrome / Mozilla Firefox)
Database (MySQL)
Windows Installation
XAMPP
Writing PHP
starts with <?php
Ends with ?>
Localhost – PHP Info
Make sure your web server is running
#
$x=“Hello”;
$y=“World”;
PHP Increment / Decrement Operators
$var1 - $var2
$var1++
$var1--
Working with Floats
Round(variable, #of decimal points)
Ceil(variable)
Floor(variable)
Form attributes
action
method
Form Methods
GET method
POST method
GET
$_GET[‘variable’]
POST
$_POST[‘variable’]