Learn how to use the exercise files that accompany this course.
- [Instructor] This course includes a set of exercise files. In order to make use of those files, you'll want to first make sure that you have PHP and MySQL installed and working. The exercise files are arranged by chapter and by movie, and you can find the exercise files that correspond to the movie that you're watching by first looking for the chapter number and then the movie number. You should copy the exercise files into your web document root directory. That's the location where your web server will look for files whenever a browser requests them.
On my Mac, that's going to be inside my user directory inside the sites directory. It's always a good idea to make a copy of the exercise files so that you still have the original to refer back to if you make changes. I will option drag the folder and create a new copy. Our project will also need a database for the exercise files to work correctly and your database needs to match what the files expect. In the exercise files, you will also find a database file that ends in .SQL. You can load into MySQL to put your database into the same state as mine.
If you don't already have a database, the first few movies of chapter one will get you started. You can then load that file directly into a MySQL database either by using a tool such as PHP MyAdmin, or by going to a command line application and typing mysql space dash u followed by a username that's authorized to access the database followed by the dash p option and then the database name, which is globe_bank, followed by a less than sign and then the path to get that database file.
If you're on a Mac, you may be able to just drag that file into the window in order to get the full path. Once I hit return, it will prompt me for my password. And this will be the password that matches the username. Note that the import will remove all old database data at the same time as it imports new data. Importing can also be useful if you do a lot of experimenting on your own, but then you want to get your data back in sync with mine. Once you have the same files and the same database, you will be able to follow along with me.
Everything that's in the exercise files, we will create together during the tutorials, so you can just work along with me and your files will mirror what's in the exercise files. Remember that you can pause the video or rewind if you need more time to copy something down. You can also use the exercise files to check your work or to get back in sync if you experiment on your own.
- Creating a content management system
- Building dynamic content navigation
- Using context and function options for conditional behavior
- Hiding content from the public view
- Insecure direct object reference
- Allowing HTML in dynamic content
- Previewing content in the public context
- Working with cookies and sessions
- Storing status messages in the session
- Secure user authentication (login/logout)
- Regulating page access
- Nesting related resources
- Managing an ordered list automatically