Building Dynamic Websites with PHP and MySQL

In this course you will learn how to create dynamic, data driven websites using the LAMP stack.
Course info
Rating
(315)
Level
Intermediate
Updated
Feb 25, 2014
Duration
5h 0m
Table of contents
Introduction
Building the LAMP Stack
Accessing Form Data with PHP
The Lending Library's Database
Accessing a Database from PHP
Doing More with the Database
Maintaining State in Web Applications
Granting Privileges in MySQL
Putting it all Together
Staying Safe
Going Further
Description
Course info
Rating
(315)
Level
Intermediate
Updated
Feb 25, 2014
Duration
5h 0m
Description

In this course you will learn how to create dynamic, data driven websites using the LAMP stack. The course focuses on the integration of the LAMP components (especially MySQL and PHP) to create a complete working site. Throughout the course, a lending library that needs a web application to track its books and borrowers provides a scenario for discussion and demonstration. Attention is also paid to best practices for keeping the site secure. Students should have a basic prior knowledge of relational databases and SQL and of the PHP language (variables, operators, loops, branches, and simple string handling). Basic competence at the Linux command line (including the ability to edit text files) is also assumed. Students can follow along with all demos by pre-installing Centos 6 (or similar) into a virtual machine.

About the author
About the author

Dr. Chris Brown has been using UNIX as a software developer and system administrator since its pioneering days over 30 years ago, and has used Linux professionally and at home for about 10 years.

More from the author
Securing Linux Servers
Intermediate
4h 24m
Oct 18, 2016
Linux Network Programming
Intermediate
3h 24m
Mar 14, 2016
More courses by Chris Brown
Section Introduction Transcripts
Section Introduction Transcripts

Accessing a Database from PHP
Welcome to Pluralsight, and welcome to this course on Building Dynamic Websites with PHP and MySQL. I'm Dr. Chris Brown. This lesson is called Accessing a Database from PHP, and it's really at the heart of the course because this is the first time we've brought together our two core technologies, MySQL and PHP. Now we're going to focus on a set of extensions to PHP called PDO, that's PHP Data Objects. And we'll see how to use these extensions to connect to the database and log in, to build and execute a query to retrieve the results and display them, and we'll use this to implement a book search page for our library. I'll also talk a bit about validating user input and we'll end with a brief comparison of PDO with mysqli, which is a competing library in some sense. So, PDO is a set of PHP extensions for accessing databases. It's Object-Oriented. So, there may be some conceptually new stuff here if you've not done any OO programming before, and it also supports error notification through the use of exceptions. Again, this may be new to you. Now, PDO supports multiple databases, but you have to install the driver that's appropriate to the database you want to use. Obviously, our interest here is in using MySQL, and it's available from PHP 5. 1 onwards.