PHP Programming
CS 130A
Spring 2012
and acknowledge the CS 130A Advisory.
Advisory
Before you register for this course, read this advisory carefully and determine, based on your skills, whether this course is right for you. If do not have the basic skills listed below, your likelihood for success in the course is seriously diminished, and I urge that you do not take the course.
- CS 130A is not an introduction to computer programming, nor is it an introduction to Web development, HTML, Javascript, CSS, or MySQL. Those topics are covered in other CCSF courses. If you are not competent in HTML and you are not aware of basic programming concepts, you should take courses in those topics before learning PHP. See the CCSF Computer Science and Computer Networking and Information Technology department programs for a list of appropriate classes.
- To succeed in this course you will need:
- A basic knowledge of fundamental programming concepts.
- You should know how to use variables, arrays, hashes, conditional structures, while loops, and files.
- If these terms are unknown to you, do not take this course. Instead, take a beginning programming course such as CS 110A or CS 111A.
- HTML is part of every PHP script. CS 130A is not an HTML course and I do not teach HTML in the course. If you do not know HTML, the course will be unnecessarily challenging for you. Before taking 130A, you should you learn the basics of HTML by taking one of CCSF's HTML courses.
-
All of our class work will be done on a Linux server.
You need, or must be willing to learn on your own, basic computer skills, such as
- Logging in to a remote Unix computer.
- Creating directories (folders), and files.
- Setting directory and file permissions for web sites.
- Editing files on remote Unix servers via a GUI client, or in a shell a remote editor.
- If you do not have these skills, you will have to learn them on your own, which increases your workload for the course. The ACRC (Academic Computing Resource Center) on the 3rd floor of Batmale provides introductory material on how to work with CCSF Unix and Windows networks.
- I do not use class time to teach the fundamental topics outlined in this advisory. Instead, I will refer you to external resources, and you will be responsible for acquiring those skills on your own time.
I have read and I understand this advisory.
Syllabus
Course Information
CCSF Resources
Catalog Description
CS 130A is an introduction to PHP, an open source server-side embedded scripting language used for the rapid development of database-driven web sites. This course is recommended for anyone needing to build dynamic web sites and web applications and covers the semantics and syntax of the PHP language, including discussion on the practical problems that PHP solves.
Course Objectives
-
Learn how to use PHP along with HTML and relational databases to build dynamic websites. This entails:
- Manipulating files, text, and images.
- Sending dynamically created email.
- Connecting to relational databases such as PostgreSQL, SQLite, Oracle, and MySQL.
-
Use our PHP knowledge to build a web site with dynamically generated content. This process includes:
- Working with included PHP files.
- Using functions and libraries of PHP code.
- Working with images and files.
- Sending e-mail.
- Using a relational database to store and retrieve information.
Textbooks

--Larry Ullman, Peachpit Press. This book is available at the CCSF bookstore and online. There are also PDF and Kindle versions.
PHP: The Good Parts --Douglas Putnam
Course Topics
- PHP script setup and execution
- Overview of PHP features and syntax
- Data types: scalar data, arrays, numbers, strings, and resources
- Regular expressions
- Input/Output functions
- Control Structures, blocks, and compound statements
- Functions (subroutines)
- Interfacing with the Unix system
- Databases and PHP
- Installing PHP on Unix and Windows
Course Material
Assignments and Workload
HOMEWORK
All lab/homework assignments will be posted on the class web site (http://insight.ccsf.edu). You may write your code on any computers available to you, but your programs must ultimately run on your CCSF Hills Unix account. Labs are graded and count for 38% of your grade. All labs have an explicit due date.LATE HOMEWORK
Labs turned in late lose 10% for each day late. Labs turned in more than four days late receive a grade of zero for that assignment. It is your responsibility to keep track of the assignment due dates. There are no makeup labs or extra credit assignments for missed labs.
Weekly Quizzes
Weekly quizzes count for 33% of your grade. The quizzes are based on the reading material, lectures, and the labs. Each quiz has an explicitly stated closing date. It is your responsibility to keep track of quiz closing dates. There are no makeup quizzes for missed quizzes.Class Participation
Four per-cent (4%) of your grade is derived from class participation. Your contributions to the class are important. You can contribute in the classroom and in the forums.GRADING
If you do not wish to receive a letter grade, you can opt to take the course for a P/NP (Pass/No Pass) grade. You must invoke this option before Feb 21.
Forum participation 4% Labs 38% Weekly Quizzes 33% Midterm Exam 10% Final Exam 15%90..100 A 80..89 B 70..79 C 60..69 D < 60 F
CCSF Unix Account
Each student is assigned a Unix shell account on hills.ccsf.edu (HILLS). All of your class work will be run on that server. Your User Name will be the name portion of your CCSF Google email address. If you have opted out of CCSF Google email, the system will generate a User Name for you. If you do not know your User Name, I can tell you what it is.
Student conduct on this server must adhere to the CCSF Student Code of Conduct.