Join David Powers for an in-depth discussion in this video Generating a unique key when registering users, part of PHP: Managing Persistent Sessions.
- So you'll need to change the database name…and the user account details…to match your setup, if necessary.…And if your server's running PHP 5.4,…you'll also need to include…the password compat library at this point.…You can download it from the location described in…What you should know before watching this course.…But it's required only for PHP 5.4.…Now that you know what the persistent session handler…and autologin classes do,…it's time to put them to work.…In the Chapter 5 05_01 folder are two other folders.…
The first one, called classes,…contains the final versions of the three classes…that we've been working with…and of the PersistentProperties trait.…If you haven't already done so,…you need to copy these files…to the Foundationphp Sessions folder…in the testing site route.…The other folder is called test.…You need to copy this folder…and then paste it in the testing server route.…And this folder contains a series of files…that we'll be using to test the autologin system.…
So open register.php and load this into a browser.…
- Configuring sessions
- Inspecting how session data is stored
- Implementing persistent sessions
- Creating a SQL database to store session data
- Implementing the PHP SessionHandlerInterface
- Writing session data
- Closing and destroying sessions
- Creating an auto-login system with persistent sessions
- Creating persistent logins
- Checking out visitor credentials
- Authenticating users
- Logging out users selectively
Skill Level Intermediate
PHP: Accessing Databases with PDO and MySQLiwith David Powers3h 47m Intermediate
1. Sessions and Security
2. Preparing the Database
Connecting to the database5m 49s
3. Storing Session Data in MySQL
4. Creating an Autologin System
5. Testing the Autologin System
Final thoughts3m 9s
- 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.