PHP

PHP is a widely-used general-purpose scripting language that is especially suited for web development and can be embedded into HTML. PHP is a powerful cross platform server side script language. It is a full featured programming language capable of managing huge database driven online environments. Using PHP you can query databases, create images, read & write files, talk to remote servers – the possibilities are endless.
PHP’s language syntax is similar to C’s and Perl’s. It generally runs on a web server like Apache which is configured to take PHP code as input and create web page content as output. It can be deployed on most web servers and on almost every operating system and platform free of charge. PHP is installed on more than 20 million websites and 1 million web servers.

Php Topics Covered

Part I: Working with PHP
Getting Started with PHP-Variables
Assigning Simple Variables Within a Script
Delimiting strings
Assigning arrays within a script
Assigning two-dimensional arrays in a script
Accessing Variables Passed from the Browser
HTML forms variables
Passing arrays
Cookies
Sessions

Testing Variables
isset0
empty0
is_null0
is_int0
is_double0
is_string0
is_array0
is_bool0
is_object0
is_resource0
is_scalar0 
gettype0

Changing Variable Types
Variable Variables

Control Structures
The if Statement
Determining true or false in PHP
Comparison operators
Logical operators
Complex if statement
if…else statements
if…elseif statements
switch…case

Loops
White…
do…while
for 
foreach
continue and break

PHP’s Built-in Functions
Function Basics
Arguments
Return values

Function Documentation
Important PHP Functions
String handling functions

Writing Organized and Readable Code
Indenting
Code blocks 
Function calls
SQL statements

Includes
Include0 and Require0
Include_once0 and Require_once0

User-Defined Functions
Function basics
Returning values 
Using a variable number of arguments 
Variable scope

Object-Oriented Programming
Classes, Continued
Object cloning 
Destructors 
Exceptions

Working on a E-Commerce ( Shopping Cart ) Live Project
Click to view the live project the students would be working with during this course
Synopsis:
The data is stored in Products Table, Supplier Table, Category Table. Each product has a single supplier
 and single category.
Each supplier supplies multiple products under multiple categories 
Login Page
The user will be authenticated before they enter the website for the correct username/password.
There are 2 types of users Admin / User, the admin would have administrative rights, where as a user will 
only be able to view the products 
Search Page
After login, the user will be directed to a search page, where they can search for a product by selecting 
the supplier / category name.
In advance search, string searches can be done.
Product Result list
This page will return the result of the search criteria.
A single page will display the records dynamically from the database, 5 records at a time. Using the 
Next / Previous button users can navigate through the list of products
Details
Once the user clicks on the product name in the result list page, they are directed to the details page, 
where user can get the detail information with a image of the product
If the user is an admin, they would be given an option to add / update / delete If the user is not a admin, 
the following permissions will be disabled.
Add / Update / Delete
Displaying data from multiple tables using forms & Adding / Updating / Deleting data
Security
Extensive use of Sessions / Cookies for security purposes
E-Commerce Module
Once the above project is completed, it’s taken to a next level where the e-commerce module is generated. 
Multiple Products can be added to the shopping cart, a dynamic bill is generated and user is 
forwarded to a payment gateway to complete the transaction.