Sylabus Pragramming in PHP
Sylabus Pragramming in PHP
Overview
This course is an introduction to the PHP programming language. Topics include installation and
configuration with the Apache http server, variables and data types, language syntax, control
structures, functions, strategies and tools for handling input and generating output, error
handling, sending email, manipulating dates and times, string manipulation and regular
expressions, SQL and MySQL database access, object oriented programming (OOP), templating
with Smarty, and using packages from the PHP Extension and Application Repository (PEAR) .
Though primarily focused on PHP 4.x, the course will also take note of new features in PHP 5.
We will emphasize security and sound coding practices throughout.
Objectives
After completion of this course, students will: know how to write and understand PHP code, and
use it to build dynamic web pages; be able to install and configure third-party PHP packages; be
ready to further their knowledge of web application development with PHP in subsequent, more
advanced classes.
PHP itself, the Apache web server, and the MySQL database server are all open source products
available for download free of charge. The recommended Apache/MySQL/PHP distribution is
XAMPP ( http://www.apachefriends.org/en/xampp.html)
Students are also strongly encouraged to install any of the many competent PHP-aware text
editors or integrated development environments (IDEs) available for their platform.
Course Materials
There is no required textbook; all the material to be covered in class is available from various
free online sources. Students are nevertheless encouraged to own at least one good hardcopy
reference such as:
Page 1 of 3
• Programming PHP. Rasmus Lerdorf, Kevin Tatroe.
(O'Reilly, ISBN 1565926102)
The Sklar book is the most beginner friendly (it's also the funniest, and we all know humor is an
all-important criterion in evaluating technical writing.) Core PHP Programming is newer than
Programming PHP and covers PHP 5. On the other hand Programming PHP has near-biblical
authority, IMHO, since Rasmus is the very guy that got this whole PHP thing started.
Each week's assignment will be accompanied by recommended reading from the above and/or
online sources.
Grading Policies
There will be 10 homework assignments worth 10 points each: 9 weekly assignments, due at
sessions 2 through 9, and 2 assignments due at session 10. The 10th and final homework
assignment will be a mini PHP/web application designed and built by the student over the course
of the class.
Each of the 10 assignments will be worth 10 points. The assignments will be evaluated on these
criteria: problem solving (does it work? is it elegant and efficient?), and coding style (is it
readable? are there comments to aid the reader?).
Assignments will be handed in the old fashioned way: on a floppy diskette (or CD) at the
beginning of the class on the week in which it is due. Please don't email your assignments. Late
assignments will not be accepted.
Syllabus
Session 1 What is PHP? History of web programming; how PHP fits into the web
environment; installation and configuration; "Hello World"; syntax,
variables, operators, flow control structures
Session 2 More language basics; using GET and POST input, working with HTML
forms; built-in and user-defined functions; variable scope; using the PHP
manual, getting help
Page 2 of 3
Session 3 Input validation, string manipulation and regular expression functions; date
and time functions
Session 4 code re-use, require(), include(), and the include_path; filesystem functions
and file input and output; file uploads; error handling and logging; sending
mail
Session 5 HTTP headers and output control functions; HTTP cookies; maintaining
state with HTTP sessions; writing simple web clients
Session 6 Introducing MySQL; database design concepts; the Structured Query
Language (SQL); communicating with a MySQL backend via the PHP
MySQL API
Session 7 More MySQL database access; graphic manipulation with the GD library
Session 8 Introduction to Objection Oriented Programming; Using PEAR packages
Session 9 More PEAR packages; more OOP; the Smarty template engine
Session 10 parsing XML; PHP 5-specific features
Page 3 of 3