PHP Programming

Page 1

PHP Programing & MySql Admin

PHP is a scripting language designed to fill the gap between SSI (Server Side Includes) and Perl, intended for the web environment. The newest version of PHP is 5.5 and it is heavily recommended to always use the newest version for better security, performance and of course features. Basically, PHP allows a static webpage to become dynamic. "PHP" is an acronym that stands for "PHP: Hypertext Preprocessor". The word "Preprocessor" means that PHP makes changes before the HTML page is created. This enables developers to create powerful applications which can publish a blog, remotely control hardware, or run a powerful website such as Wikipedia or Wikibooks. Of course, to accomplish something such as this, you need a database application such as MySQL In PHP training course, students will learn to create database-driven websites using PHP and MySQL or the database of their choice. In advanced PHP training course, students will learn advanced features of the PHP web programming language. You will learn object-oriented PHP programming and how to use PHP to process XML and build Ajax applications. Class Goals                  

Learn how PHP works. Learn the basic syntax of PHP. Learn to create dynamic interactive pages with PHP. Learn to manipulate files with PHP. Learn to work with arrays in PHP. Learn to validate forms with PHP. Learn to write functions in PHP. Learn to manipulate and manage database data with PHP. Learn to authenticate users with PHP. Learn to manage sessions with PHP. Learn to work with the MDB2 package. Learn advanced form validation with regular expressions. Learn to send email with PHP. Learn how to program in object-oriented PHP. Learn to process XML with PHP. Learn to work with PEAR modules. Learn PHP Security techniques. Learn to build to an e-commerce application with PHP.

Page 1 of 12


I.

Introduction to PHP Training

Class Outline

1. PHP Basics A. How PHP Works B. The php.ini File C. Basic PHP Syntax I.

PHP Tags

II.

PHP Statements and Whitespace

III.

Comments

IV.

PHP Functions

V.

Hello World!

D. Variables I.

Variable Types

II.

Variable Names (Identifiers

III.

Type Strength

IV.

Hello Variables!

V.

Variable Scope

VI.

Superglobals

VII.

Constants

VIII.

Variable-Testing and Manipulation Functions

E. First PHP Script F. PHP Operators G. Creating Dynamic Pages I.

Single Quotes vs. Double Quotes

II.

Passing Variables on the URL

H. Passing Variables via the Query String 2. Flow Control A. Conditional Processing a.

If Conditions

B. Working with Conditions C. Loops I.

while

II.

do...while

III.

for

IV.

break and continue

D. Working with Loops

Page 2 of 12


3. Arrays A. Enumerated Arrays I.

Initializing Arrays

II.

Appending to an Array

III.

Reading from Arrays

IV.

Looping through Arrays

B. Working with Enumerated Arrays C. Associative Arrays I.

Initializing Associative Arrays

II.

Reading from Associative Arrays

III.

Looping through Associative Arrays

IV.

Superglobal Arrays

D. Working with Associative Arrays E. Two-dimensional Arrays I.

Reading from Two-dimensional Arrays

II.

Looping through Two-dimensional Arrays

F. Array Manipulation Functions 4. PHP and HTML Forms A. HTML Forms I.

How HTML Forms Work

II.

A Sample HTML Form

III.

Form Variables

B. Processing Form Input 5. String Manipulation A. Formatting Strings I.

Concatenation

II.

String Manipulation Functions

III.

Examples of String Functions

B. Working with String Manipulation Functions C. Magic Quotes I.

magic_quotes_gpc

II.

magic_quotes_runtime

III.

Recommendation on Magic Quotes

6. Reusing Code and Writing Functions A. Including Files I.

require

II.

require_once

III.

auto_prepend_file and auto_append_file

Page 3 of 12


B. Adding a Header and Footer C. User Functions I.

Defining and Calling Functions

II.

Default Values

III.

Variable Scope

IV.

By Reference vs. By Value

D. Form Processing I.

Code Organization

E. Form Validation and Presentation Functions 7. Managing Data A. Querying a Database I.

mysqli() Overview

II.

mysqli Methods and Properties

III.

Inserting and Updating Records

IV.

mysqli Prepared Statements

B. Inserting Records 8. MDB2 A. Advantages and Disadvantages of MDB2 I.

Why use a database abstraction layer?

II.

When not to use a database abstraction layer?

B. Using MDB2 C. Creating a Customer Report 9. Authentication with PHP and SQL A. A Database-less Login Form B. Authenticating Users 10. Regular Expressions A. Perl-compatible Regular Expression Functions a.

preg_match()

b.

preg_replace()

c.

Regular Expression Tester

B. Regular Expression Syntax a.

Start and End ( ^ $ )

b.

Number of Occurrences ( ? + * {} )

c.

Common Characters ( . \d \D \w \W \s \S )

d.

Grouping ( [] )

e.

Negation ( ^ )

f.

Subpatterns ( () )

Page 4 of 12


g.

Alternatives ( | )

h.

Escape Character ( \ )

C. Form Validation Functions with Regular Expressions 11. Session Control and Cookies A. Sessions a.

Configuring Sessions

b.

Session Functions

B. Cookies C. Authentication with Session Control 12. Sending Email with PHP A. mail() a.

Shortcomings of mail()

B. PHPMailer C. Sending a Password by Email 13. File System Management A. Opening a File a.

fopen()

B. Reading from a File a.

fgets()

C. Writing to a File a.

fwrite()

D. Writing to a File E. File Locking a.

flock()

F. Uploading Files via an HTML Form G. Getting File Information H. More File Functions I.

Directory Functions a.

Getting a Directory Listing

J. Creating a Resume Management Page

II.

Advanced PHP Training

Class Outline

Page 5 of 12


1. Advanced PHP Techniques A. Multidimensional Arrays B. Advanced Function Definitions C. The Heredoc Syntax D. Using printf() and sprintf() 2. Developing Web Applications .

Documenting Code A. Code Style and Structure B. Modularizing a Web Site C. Affecting the Browser Cache

3. Advanced Database Concepts .

Storing Sessions in a Database A. Working with U.S. Zip Codes B. Creating Stored Functions C. Displaying Results Horizontally

4. Security Techniques .

Remembering the Basics A. Validating Form Data B. Using PECL Filter C. Authentication with PEAR Auth D. Using MCrypt

5. E-commerce Techniques .

E-commerce Concepts A. Creating the Database B. Creating the Configuration File C. Making the Template D. Creating the Index Page E. Browsing by Category F. Showing a Product G. Implementing a Shopping Cart H. Validating Credit Cards

6. Basic Object-Oriented Programming .

OOP Theory A. Defining a Class

Page 6 of 12


B. Creating an Object C. The $this Attribute D. Creating Constructors E. Creating Destructors F. Autoloading Classes 7. Advanced OOP .

Advanced Theories A. Inheriting Classes B. Inheriting Constructors and Destructors C. Overriding Methods D. Access Control E. Using the Scope Resolution Operator F. Creating Static Members G. Abstract Classes and Methods

8. Real-World OOP .

Catching Exceptions A. Extending the Exception Class B. Creating a Shopping Cart Class C. Using the Cart Class

9. Using PEAR .

Using Benchmark A. Using HTML_QuickForm B. Using Mail_Mime C. Ajax D. Introduction to Ajax E. A Simple Example F. Full-Fledged Ajax G. Debugging Ajax Applications

10. XML and PHP .

What Is XML? A. XML Syntax B. Attributes, Empty Elements, and Entities C. Document Type Definitions D. Parsing XML

E. Creating an RSS Feed Page 7 of 12


III.

MySql Administration

Class Overview

This MySQL training class teaches the configuration, security management, administration, backup and restore, and optimization of MySQL databases. Class Goals  Understand the MySQL Architecture.  Learn to start and shutdown the MySQL server.  Learn to install MySQL.  Learn to configure MySQL components.  Learn to use different storage engines supported in MySQL.  Learn to secure the elements of a MySQL installation.  Learn to maintain security of a MySQL installation via user management and access rights.  Learn to work with the MySQL Administrator Graphical User Interface.  Learn to perform backup and restore operations using multiple MySQL tools.  Learn to optimize MySQL at various levels - installation, database and queries.  Learn to perform database replication in MySQL.

Class Outline

1. Introduction to Database Concepts and MySQL A. Features of a Relational Database B. Where does SQL Fit in? C. Database Access D. Why MySQL? E. The History of MySQL 2. Installation, Configuration, and Upgrading .

MySQL Software A. MySQL Software Features B. Preparing to Install MySQL C. Available Client Software D. After the Download E. Configuring the Server F. Starting the Server G. The Initial User Accounts H. Verifying Server Operation I.

Upgrading

J. Copying a Database Between Architectures

Page 8 of 12


K. Environment Variables 3. Database Design .

Developing the Design of a Database A. Database Entities B. The Primary Key C. Foreign Key Relationships D. Data Models and Normalization E. Second Normal Form (2NF) F. Third Normal Form (3NF) and Beyond G. Translating a Data Model into a Database Design

4. Using the mysql Command-Line Tool .

Running the mysql Client A. Customizing the mysql Prompt B. mysql Commands C. Using the Help Command D. Some Useful mysql Options E. Working with a Database F. Examining Table Definitions G. Other SHOW Options

5. DDL: Data Definition Language .

DDL and DML Overview A. Building Table Definitions B. Identifiers C. Column Definitions D. Numeric Datatypes E. ENUM and SET Types F. Date and Time Datatypes G. AUTO_INCREMENT H. UNIQUE Constraints I.

Primary Keys

J. Modifying Tables K. Foreign Keys L. Renaming and Dropping Tables 6. MySQL Storage Engines .

Storage Engine Overview

Page 9 of 12


A. Other Storage Engine Types B. The Basics of Commonly Used Storage C. Engines D. MyISAM Limits and Features E. MyISAM Data File Format F. InnoDB and Hardware Limitations G. InnoDB Shared Tablespace H. Configuration I.

InnoDB Per-Table Tablespaces

J. InnoDB Data Management K. MEMORY and FEDERATED L. MERGE and ARCHIVE 7. Utilities .

Client Overview A. Specifying Options for Command-Line B. Clients C. Client Option Files D. Checking Tables with myisamchk and E. mysqlchk F. Using myisamchk and mysqlchk for G. Repairs H. mysqlshow and mysqlimport I.

Using mysqldump

J. The Query Browser K. MySQL Query Browser: Deeper L. MySQL Administrator: Basic M. Operations N. MySQL Administrator: Monitoring the O. Server and User Administration P. Third Party Tools 8. Administering a Database and Users .

The Server-Side Programs A. Starting the MySQL Server B. Using SET for Server Options C. Table Management D. Server Log Files

Page 10 of 12


E. mysqladmin F. Backup and Restore G. Miscellaneous Functions H. User Account Management I.

Understanding User Privileges

J. User Account Rights Management K. User Account Privileges L. Managing Access to the Database M. Environment 9. Database Programmability .

Stored Routines: Basic Concepts A. Routine Creation and Use B. Flow Control Statement C. Writing Blocks of Code D. Triggers E. Stored Routines, Triggers, and the F. Binary Log G. Table HANDLERs H. Prepared Statements

10. Optimization and Performance .

Tuning A. Hardware Limitations B. Optimizing the MySQL Server's C. Interaction with the External D. World E. Adjusting the MySQL Server F. Configuration G. Optimizing Your Database H. Optimizing Queries I.

The Use of Indexes to Support Queries

J. Thinking about JOIN Queries K. Query Sorts, Indexes, and ShortCircuiting L. INSERT, UPDATE, DELETE, and M. Table Locks N. Some General Optimizations O. Optimizations Specific to MyISAM

Page 11 of 12


P. Optimizations Specific to InnoDB 11. MySQL Programming Interfaces .

Database Application Architectures A. Connecting MySQL to ODBC B. Connecting MySQL to MS/Office and C. MS/Access D. Connecting to MySQL from Perl E. Programming Perl to MySQL F. Connecting to MySQL from PHP G. Programming PHP to MySQL

Zabeel Institute – at a glance Zabeel Institute, established in 1988, is a leading Educational and Training Institute for executives in Dubai and is approved by the Ministry of Education, UAE. We offer training programs to professionals from various industries like Engineering, Construction, Projects, Accounts & Finance, and Management, Languages etc. Zabeel IT Academy Advantage “Zabeel IT Academy established in the year 1988, focusing on IT skillset building for Emiratis and expatriates in this region. Benefit from our IT Networking technology expertise being with us, Zabeel Network Academy head quartered in Dubai, having branch office across United Arab Emirates have been training a diverse range of students in entire UAE successfully for nearly three decades. We are extremely focused on IT networking training thereby conduct courses leading to certifications from the World class vendors CISCO, MICROSOFT, Linux, VMware and vendor neutral certifications like CEH, CISSP etc.

Page 12 of 12


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.