Course Content and Outcomes Guides (CCOG)

Course Content and Outcomes Guide for CAS 225 Effective Summer 2019

Course Number:
CAS 225
Course Title:
PHP and MySQL for Designers
Credit Hours:
4
Lecture Hours:
30
Lecture/Lab Hours:
0
Lab Hours:
30
Special Fee:
$12.00

Course Description

Develops skills to create server-side scripts using PHP. Introduces server-side programming concepts and terminology. Explores a variety of server-side techniques and MySQL database manipulation. Covers the installation of PHP and MySQL. Uses the current versions of HTML and CSS. Prerequisites: CAS 213 or CIS 133W or instructor permission. Audit available.

Intended Outcomes for the course

Upon successful completion students should be able to:

  1. Write PHP code to produce outcomes and solve problems.
  2. Display and insert data using PHP and MySQL.
  3. Test, debug, and deploy web pages containing PHP and MySQL.

Course Activities and Design

Outline of topics to be covered in this class (does not have to be in this order)

  • Setup
    • Install and configure a PHP editor
    • Install and configure a PHP and MySQL package (XAMPP suggested)
    • Set up a PHP and MySQL site online
    • Overview of PHP, basic syntax of PHP, creating a php “island”, using a .php extension
    • Create a simple PHP page
  • Statements, variables, operators, comments, functions, scope
    • Writing your own code in PHP pages
    • Creating and using variables; assignment statements; types of variables; variable naming
    • Operators, comments, built-in functions
    • Variable scope: local, global, superglobals ($_GET, $_POST, $_SESSION, etc.)
    • Basic debugging: develop the ability to understand PHP error messages and use them to debug written code.
  • Arrays and Control Structures
    • Simple and associative arrays
    • If, else, while, for, foreach (optional: switch)
    • Error handling with try…catch
  • Structured PHP programming
    • User-defined functions, passing variables (optional: returning a value)
    • Includes
  • Database concepts and SQL
    • Database concepts: Fields, records, relational database, types of relationships, normalization
    • SQL: Syntax of most common SELECT statements, keywords, INSERT, UPDATE, DELETE
      • Optional: DDL example (CREATE DATABASE or CREATE TABLE)
  • MySQL
    • PHPMyAdmin
      • Create a user account, a database, a table; data types and storage engines (InnoDB)
      • Exporting and importing a database and tables with PHPMyAdmin
  • Using MySQL with PHP
    • Connect to a database with PDO; PDO vs mysqli
    • Writing and executing SQL statements with PHP and PDO
    • SELECT data from 2 related tables and display it on a webpage
  • Processing forms with PHP
    • Collect data in a form, submit to a processing page
    • Display data submitted by the form in a processing page
    • Security: sanitizing data to prevent SQL Injection, buffer overflow, etc.
    • Insert data from a form into a database with INSERT (Optional: DELETE and/or UPDATE)
    • Email the submitted data (PHPMailer)
    • Server-side validation of form data with “if” statements
  • Optional
    • Logins and passwords: Create a session, use a login to limit access to one or more pages

Outcome Assessment Strategies

- Project(s) incorporating concepts learned in the class
- May include objective tests or scored assignments