The PHP scripting language is predominantly used to add executable content to Web pages. This course will teach you the fundamentals of programming in PHP, as well as Web-related issues such as linking a series of forms together into a session, maintaining state if multiple users are on your site at the same time, cookies, security and other matters. The course also also covers PHP's interfacing to relational databases in some depth, with a particular study of MySQL.
Objectives
The PHP programming training course provides an intensive hands-on introduction
to developing intelligent commercial web applications with PHP. Available as
a public or closed course at our London training centre, or can be tailored
to your team's requirements and delivered onsite as a bespoke, customised training
course.
What You Will Learn
Course Content
Course content has been developed for real-world, commercial scenarios by our expert instructors. See below for detailed syllabus, or if you have a technical query email .
Duration
4 Days
Who Should Attend
Developers who are looking to gain gain the skills to develop commercial PHP
systems.
Prerequisites
In order to use PHP, you should be familiar with the structure of HTML and the
Web. A knowledge of programming and SQL is also useful.
We understand that many PHP users are dropped in at the deep end without knowledge
of some of these topics. If you're in that situation, we offer an extra day
(Technology background for PHP) immediately prior to the main course, jump-starting
you in whatever background topics need to be covered.
Associated Courses
MySQL Database Design
What is PHP?
What hardware and software do I need?
Examples of PHP in use.
Whys use PHP rather than the alternatives?
When and where is PHP available? Versions of PHP (3 v 4).
A First PHP Web Page (module H102)
How do I enter and edit a PHP script?
Adding PHP within an HTML page.
How do I run a PHP Script?
First Script - including the day of the week in a web page.
Sequences of statements.
Editing and debugging your PHP.
Commenting your PHP.
Debugging techniques.
Variable naming, creation.
Strings, Integers and Floats.
Constants.
Saving values in variables and retrieving them.
Arithmetic, logical, relational, bitwise and other operators.
Combining operators; expressions, precedence, etc.
Comments.
Including a file.
Booleans, True and False.
Conditionals - if, elseif, else, ?: snd switch.
Loops - while, do, and for.
Controls - break, continue, exit, die and return.
Making up a table in PHP.
Declaring and calling a function.
Arguments and return values.
Variable scope, global and static.
Loading functions from another file.
Library functions - overview.
Call by name and call by value.
Creating arrays, storing and retrieving values.
Indexing by number or by string.
Initialising arrays.
Review of the fundamentals.
Formatting strings.
String cleansing.
Low-level string manipulation.
Tokenizing a string (explode).
Regular expressions.
Defining simple objects.
Creating an object using new.
Access properties and methods.
Defining inheritance and using polymorphism.
A practical example.
Standard methods and inheritance.
Opening access to files on the server.
Reading from and writing to files.
File and directory functions.
Include and require.
Writing to the browser.
Reading from a form.
Environment variables.
Worked Example, Course Review Sheet.
Specification of task.
The initial form and PHP.
The emailing script and "Thank You" page.
Sessions, state and multiple concurrent users.
Using an HTTP connection and authentication.
Cookies.
Session functions.
File Uploads.
Sending emails from PHP.
Including attachments.
Database Structure.
Introduction to SQL and MySQL.
Principles of database programming from PHP.
Creating tables.
Adding and changing information.
Retrieving information from a table and reporting it to a web page.
Deleting tables.
Using an alternative database - example Oracle (OCI) calls.
Other databases and interfaces such as ODBC, Oracle, postgreSQL and Sybase.
Sourcing PHP for various platforms.
Installation requirements, webs servers, etc.
Configuring PHP - the php.ini file.
Form variables, error handling, and other choices.
Mail, Session, file upload SQL and other configuration.
Setting resource limits for PHP
The need for a database wrapper.
Overview of ADOdb.
Connecting to the database.
Executing the SQL.
Retrieving the results.
MetaTypes.
Other useful functions.
MySQL example.
Session support through ADOdb.
Variable declaration and typing.
Explicit converters.
Sorting.
User-defined sorting.
Sorting an associative array.
Other array re-ordering functions.
Multidimensional arrays.
Flexibility with multidimensional arrays.
Graphics.
Using PHP away from the Web server.
Example of PHP running from keyboard to screen.
What is XML?
XML Handling in PHP.
A Simple Parser.
Extending the example.
Analysing XML as a stand-alone program.
Other XML Subjects.
Analysing the requirement and designing the Application.
The batchlet model and multi-task PHP scripts.
Writing maintainable code.
Error checking and data integrity in a multi-user environment. Good use of functions and include files.
Separating HTML from script from SQL.
Keeping databases, directories and shopping carts tidy.
Portability issues (databases, operating systems, PHP releases and installation).
Future-proofing.
Backups.
Putting in all together in a practical example.
Data file database of products.
User Tracking.
Keeping HTML templates apart from the code.
Developing the page look using a tool such as Dreamweaver.
Secure Server.
Verification of user details.
Accepting on line credit card details or online payment.
Security from first principles.
PHP as a CGI library and as an Apache Module.
Issues with Register Globals.
Hiding PHP.
MySQL table of authorised data editors.
Administrator and editor login capability.
Second MySQL table of data to be managed.
Select and display system for any site visitors.
Editing system for authorised editors using cookies and carts.
Authorization through passwords, password edit capability.
Ability to edit editor list for the administrator.
![]() |
![]() |
![]() |