PHP2 - Intermediate PHP - Level 2
The focus of this Intermediate PHP training course is techniques for linking PHP scripts with data stored in a backend database. Students will install and configure MySQL, and then access the database system through PHP pages. The concepts of accessing and modifying information in a relational database management system through PHP, however, transcend the specifics of MySQL and are easily translated into other backend systems like PostgreSQL, Oracle, and even SQL Server. Data-driven Web sites provide timely and critical information, so these techniques are essential for state-of-the-art Web developers.
Introduction
Requirements
Materials
Assumptions
Objectives
Conventions
Installation and Configuration (Slackware Linux lab)
Installing Slackware Linux (with Apache and PHP)* (* Normally completed in Level 1 session)
Configuring Apache for PHP* (* Normally completed in Level 1 session)
Checking your installation* (* Normally completed in Level 1 session)
Installing and Configuring MySQL
Testing your MySQL installation
Using MySQL (lecture, exercises)
Introduction to SQL
SQL DDL: CREATE, ALTER, DROP
MySQL: SHOW and DESCRIBE
SQL DCL: GRANT and REVOKE
SQL DML: SELECT
SQL DML: INSERT, UPDATE, REPLACE, DELETE
Advanced MySQL (lecture, exercises)
SQL DML: Table JOINs
SQL DML: SELECT . . .INTO, UNION, TRUNCATE
Table Loading: LOAD DATA INFILE
Backup/Restore
MySQL Optimizations
MySQL and PHP (lecture, exercises)
Connecting to MySQL from PHP
Executing a simple MySQL query
Updating a MySQL database
Error handling and reporting
Maintaining security for your database
Building Dynamic, Data-driven Web Pages – part 1 (lecture, lab)
Problem definition: a Web-based membership system
Data modeling: creating a database design
Interactive SQL: creating your database tables
Interactive SQL: loading initial data
Building Dynamic, Data-driven Web Pages – part 2 (lecture, lab)
Using HTML forms to collect data
Using a PHP data connection to update your database
Building dynamic SQL selection strings
Displaying dynamic SQL results in an HTML table
Authenticating users through MySQL
Building Dynamic, Data-driven Web Pages – part 3 (lecture, lab)
Creating administrative features for your site
Locking/limiting users to maintain data integrity
Data encryption with PHP/MySQL
Data Mining and Analysis in MySQL (lecture, exercises)
Interactive SQL: using aggregate functions to summarize your data
Interactive SQL: producing reports
Conclusion (review, discussion, evaluation)