Dynamic Web Development with PHP
Build dynamic Web sites using PHP and MySQL
The Web today is an increasingly dynamic environment. PHP, in conjunction with the database MySQL, is the leading technology used to build millions of dynamic Web sites.
In this six-lesson class, you'll learn how to develop dynamic Web site features using PHP and MySQL. Working step-by-step, you'll learn how to: set up and configure a Web site and development site for PHP development; design and build a MySQL database and write basic SQL queries; write basic PHP scripts to collect and process information from forms, troubleshoot and fix common PHP scripting errors; write scripts to store information in a database; and display dynamic information on multiple pages within a site.
The course provides a broad foundation in Web site development using PHP and MySQL. Course assignments focus on learning how to correctly write scripts and queries and building functional forms. By the end of the course, you'll create an online catalogue that displays product information pulled from a database. Working with renowned PHP expert Janet Valade, you'll build a foundation for developing online customer accounts, mailing lists, user polls, forums, shopping carts, and more.
Important: This course is quite technically challenging. Students entering this class should have a strong experience and comfort with hand-coding HTML and CSS and experience with basic site development in Adobe Dreamweaver.
is an accomplished dynamic Web developer and author.
Course content developed by
To take this course you'll need:
- Computer with Internet connection (56 Kbps modem or faster).
- Strong experience and comfort in hand-coding HTML and CSS, including ability to code the different types of HTML form fields.
- Adobe Dreamweaver and basic Dreamweaver experience.
- An account with a Web hosting provider. If you do not yet have a Web hosting account, providers will be recommended to you. If you do have a Web hosting account, you must have access to PHP and MySQL.
The following courses can help you meet the above requirements:
Students learn how to:
- Identify the differences between static and dynamic Web design and the specific benefits of using PHP and MySQL.
- Install a development environment on a Mac or PC, make an existing sites dynamic in Dreamweaver, and configure a Web site and development site for PHP.
- Grasp the basics of how MySQL works and and access and manipulate a MySQL database using a cPanel and phpMyAdmin.
- Implement a basic database design, defining required information and structuring database tables appropriately.
- Build a database using phpMyAdmin and write SQL queries to add, retrieve, change, and remove data from it.
- Back up the database to your local development environment and restore it to a live site using phpMyAdmin.
- Write basic SQL queries for typical customer information requests.
- Name, create, and assign PHP variables and check their contents.
- Use PHP to store information as character strings and numbers and display it using echo statements.
- Organize your scripts for easy development and maintenance.
- Interpret and debug common PHP error messages.
- Use variables and functions to set up conditions and write if statements.
- Write scripts to process information submitted in a form, check its format, and redisplay the form when information is missing or invalid.
- Set up different levels of user account, using hostnames, passwords, and account privileges, to connect to a MySQL server.
- Write PHP scripts to store data collected in HTML forms, protecting a site against SQL injections.
- Write scripts to retrieve data from a database and display it on a Web page.
- Build a basic dynamic form that pulls date and time information from a database.
- Use PHP to move users to a different page, pass information from one page to the next, and display information throughout a site.
- Write basic PHP functions to perform repeated tasks.
- Build an online login application.
- Write an application to display an online catalogue.
LESSON 1 Intro to PHP
In Lesson One, you'll learn the basics of how dynamic sites work. You'll explore the differences between static and dynamic sites and the benefits of using PHP and MySQL. You'll learn how to add PHP code to a Web site, and examine how PHP files are processed by a server. To prepare you for PHP development, you'll learn how to install your development environment (on your Mac or PC), and make existing sites dynamic in Dreamweaver. You'll write a basic PHP script and configure your Web site and development site for PHP. In the exercise, you'll confirm your development setup and publish a Web page with a PHP script.
LESSON 2 Building and Using MySQL Databases
Most dynamic Web sites need a backend database. A database contains information that is displayed to users online, such as product information in a catalog. Lesson Two explores how to design, build, and access a MySQL database for a dynamic site. The lesson begins by explaining how MySQL works and showing how to access a MySQL database using a cPanel and phpMyAdmin. Next, you'll explore the basics of database design, learning how to define required information and structure database tables. Using phpMyAdmin, you'll learn to build a database and write SQL queries to add, retrieve, change, and remove data from it, as well as back up the database to your local development environment. In the exercise, you'll design and build a customer information database, and write SQL queries for typical customer information requests.
LESSON 3 Collecting Information in a Form
Lesson Three focuses on the challenge of writing PHP scripts to display dynamic forms. You'll begin by learning how to separate logic and display code in your PHP scripts and comment your code. Then you'll learn how to name, create, and assign PHP variables as well as check their contents and explore how to store information as character strings and numbers and display it using echo statements. In the second half of the lesson, you'll connect what you've learned to more complex forms, learning how to organize scripts using display and logic scripts and how to walk through an array. To combat inevitable scripting errors, you'll learn how to interpret and act upon common PHP error messages. In the exercise, you'll learn PHP syntax by debugging a sample script, and write a script to display a form for your customer information database.
LESSON 4 Processing Information from a Form
Dynamic Web pages essentially collect information from visitors in HTML forms and respond to that information. Lesson Four discusses how to write scripts to process information submitted in a form, checking its format, and redisplaying the form when information is missing or invalid. During the lesson, you will learn how to use variables and functions to set up conditions and write if statements. Various tasks including comparing values, testing variable content, and pattern matching are discussed and then explored in the context of processing form information. In the exercise, you'll write scripts to test the format of information and write a complete script to process a form.
LESSON 5 Interacting with the Database
The database is the center of your dynamic Web site, whether you want to display information from your database on your Web page or store information in your database that you collect in a form. Lesson Five focuses on using PHP to interact with a MySQL database. You'll learn how to set up different levels of user account, using hostnames, passwords, and account privileges, so that you can connect to a MySQL server. You'll discover how to write PHP scripts to store data, protecting yourself against damaging queries. Then you'll explore how to retrieve data from the database and display it, using different kinds of loops and displaying several rows if needed. You'll also focus on the challenge of building dynamic forms—forms whose structure and content is defined by data in a database. In the exercise, you'll build a login application, one of the most fundamental applications used on the Web.
LESSON 6 Working with Multiple Page Web Sites