PHP & MySQL

PHP and MySQL Syllabus and Assignment Sheet

Book: PHP 6 and MySQL 5 for Dynamic Web Sites

Includes: PHP and MySQL

Estimated Completion: 90 hours

Text: PHP 6 and MySQL 5 for Dynamic Web Sites ©2008, Larry Ulman
ISBN: 978-0-321-52599-4

Cost: $29.69 - Search to see if you can find this book used

Files: Ask your instructor to copy the necessary files to your user directory. They will be placed in a folder called phpmysqlvisual.

Companion Web Site: http://dmcinsights.com/phpmysql3/

Errata: http://dmcinsights.com/phpmysql3/errata.php (print the errata and be sure to check it for updates frequently.)

Forum: http://dmcinsights.com/phorum/list.php?19 (the forum has many helpful posts, errors, etc.)

Prerequisite: JavaScript the Missing Manual - The JavaScript unit should be completed before you begin the PHP and MySQL unit. If you find the concepts difficult in the PHP 6 and MySQL 5 for Dynamic Web Sites book difficult you may want to supplement your learning with the PHP for the World Wide Web book.

Software: I would recommend using Dreamweaver to complete this book. It is easy to setup a testing server with your robinshosting.com account. Dreamweaver has built-in FTP.

Advanced Studies: If you want to learn advanced PHP and MySQL concepts you may want to read PHP and MySQL Web Development. (Note: This book is not supported in class)

General Notes - Before You Start the Book

Important Class Resources

Your instructor provides extensive additional resources for Web design. You should familiarize yourself with and bookmark the following sites:

  1. Lecture notes are available at: http://www.robinsblog.com - This site is updated several times per week. Students should check this site daily for important class announcements and updates.
  2. Class forum - A place to discuss Web development. Please register to use the forum.
  3. Web design tutorials are available at: http://www.tinkertech.net. - Spend some time getting familiar with this site, it is a collection of topics discussed in class over the last several years.
  4. Free Web site hosting for current students is provided at http://www.robinshosting.com.
  5. Resources for learning cPanel
  6. You may need to change permissions on some files or folders. You can either use cPanel's File Manager or read FTP and Understanding File Permissions.

Review the PHP with MySQL Essential Training at Lynda.com. You will need to ask your instructor for a username and password.

All software that you will need during class can be accessed from the Web Development folder in the Start menu.

Setting Up A Testing Environment

In order to preview PHP files they must be processed on a server that supports PHP. While the book gives instruction on how to install local testing servers (XAMPP, WAMP, MAMP, etc.), you can use your robinshosting.com account as your testing server instead.

Create a folder on drive O:\ called phptest - you should save files that you create in this folder.

Use cPanel to create a folder called phptest in your public_html directory - you will upload files to this folder.

Setting Up a Site Definition in Dreamweaver

If you need a refresher on how to setup a site definition in Dreamweaver review the section Site Control - Defining a site in the Dreamweaver CS3 Essential Training at Lynda.com.

Setup a site definition in Dreamweaver by clicking Site > Manage Sites > New > Site.

Site Name: PHP Testing Site

Local root folder: Click the small folder icon and navigate to O:\phptest (your path will be different from my screen capture below - If you were working at home your path may look similar to the image below).

Dreamweaver Local Site Definition

Click the Remote Info Category

Click the Access drop down menu and select FTP

FTP host: This is your robinshosting account address

Host directory: public_html/phptest

Login: Your robinshosting.com username

Password Your robinshosting.com password

Essentially this is the same information that you use with Filezilla

Dreamweaver Remote Site Definition

Click the Testing Server Category

Click the Server Model Drop down and select PHP MySQL

Click the Access drop down and select FTP

Most of the necessary information should be already completed. You will need to make one change to the URL Prefix

URL Prefix

So the URL prefix should look like this

Correct URL prefix

You must always remove the public_html/ from the URL prefix when you are setting up a testing server.

Click OK twice and click Done.

All of the files that are related to this book should be saved to O:\phptest. When you preview a file in your Web browser Dreamweaver will automatically upload the file to the testing server allowing the PHP code to be processed and displayed properly.

While you are working in Dreamweaver you will be working in Code View. If you need a Dreamweaver refresher review Dreamweaver CS3 Essential Training at Lynda.com.

Chapter Notes/Comments

Companion Web Site: http://dmcinsights.com/phpmysql3/

Errata: http://dmcinsights.com/phpmysql3/errata.php (print the errata and be sure to check it for updates frequently.)

Forum: http://dmcinsights.com/phorum/list.php?19 (the forum has many helpful posts, errors, etc.)

Chapter 1: Introduction to PHP

Page 4 #5 - Preview your page in the Web browser by pressing F12, you will be prompted to upload your files to the testing server.

Update files on the testing server

Click Yes to the prompt and Yes to the Dependent files prompt. Your page will display in the Web browser.

Use this process whenever you want to preview a page with PHP.

Be sure to check the errata for any known errors

Chapter 2: Programming with PHP

Be sure to check the errata for any known errors

Chapter 3. Creating Dynamic Web Sites

Be sure to check the errata for any known errors

Chapter 4: Introduction to MySQL

You may want to review the MySQL Essential training at Lynda.com before you begin this chapter.

Read until page 120 - To access phpMyAdmin vist http://robinshosting.com/cpanel and use your robinshosting.com username and password to login. Scroll to the Databses section of the page and click the phpMyAdmin link.

Be sure to check the errata for any known errors

Chapter 5: Introduction to SQL

Page 128 - Insert your own information into the users table.

Page 130 - You can copy and paste the required SQL file contents from the book's Web site into phpMyAdmin.

Be sure to check the errata for any known errors

Chapter 6: Advanced SQL and MySQL

Page 172 - You can copy and paste the required SQL file contents from the book's Web site into phpMyAdmin.

Be sure to check the errata for any known errors

Chapter 7: Error Handling and Debugging

Be sure to check the errata for any known errors

Chapter 8: Using PHP with MySQL

Be sure to check the errata for any known errors

Chapter 9: Common Programming Techniques

Be sure to check the errata for any known errors

Chapter 10: Web Application Development

Page 305 #7 - You will need to create the uploads folder in public_html for the script to work. The path will be ../../..uploads

You must complete script 10.5 before script 10.4 will work

Be sure to check the errata for any known errors

Chapter 11: Cookies and Sessions

Be sure to check the errata for any known errors

Chapter 12: Security Methods

Be sure to check the errata for any known errors

Chapter 13: Perl-Compatible Regular Expressions

Be sure to check the errata for any known errors

Chapter 14: Making Universal Sites

Page 425 - Collator does not work in PHP5. Read pages 425-433.

Be sure to check the errata for any known errors

Chapter 15: Example - Message Board

Page 444 - If you're using phpMyAdmin, skip to step 2

Be sure to check the errata for any known errors

Chapter 16: Example - User Registration

Be sure to check the errata for any known errors

Chapter 17 Example - E-Commerce

Be sure to check the errata for any known errors