Join Kevin Skoglund for an in-depth discussion in this video How to use the exercise files, part of PHP with MySQL Essential Training: 1 The Basics.
- [Instructor] This course includes 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 route directory. That's the location where your web server will look for files when a browser requests them. On my Mac, that will 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'll still have the original to refer back to if you make changes. I'm going to opt + drag the folder to create a new copy. Beginning in chapter five, we'll be incorporating a database into our project, and for the exercise files to work, your database needs to match what the files expect. In the exercise files for these chapters, you will find a database file that 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 five will get you started.
You can load that file directly into a MySQL database, either by using a tool such as phpMyAdmin, or by going to a command line program, and typing, mysql, then a space, -u, and then a space, and then a username that's authorized to access the database, and then, -p. Follow that with the database name that you want to import into, and then a less than sign, and finally, the path to the exercise 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 to that file.
When we finally hit Return, it'll prompt you for a password, and you enter the password for the user that you specified. And then the data will be imported. 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 want to get your data back in sync with mine. Once you have the same files in the same database, you'll 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.
- Organizing project files
- Including and requiring files
- Working with URL parameters
- Encoding dynamic content
- Modifying headers and page redirection
- Creating forms and processing form data
- MySQL basics
- Using PHP to access database tables
- Creating, reading, updating, and deleting database records with PHP
- Validating data
- Preventing SQL injection
Skill Level Beginner
1. Start a Database-Driven Project
2. Build Web Pages with PHP
3. Headers and Redirects
4. Build Forms with PHP
5. MySQL Basics
6. Use PHP to Access MySQL
7. CRUD with PHP
8. Validate Data with PHP
9. Prevent SQL Injection
Next steps1m 8s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.