Use PHP to set and read back values stored in browser cookies.
- In this movie, we'll learn to use PHP…to set and read cookie values.…PHP has a function for setting cookie values,…and it's called " set cookie".…Takes a number of different arguments,…but there are three that are the most important.…The name of the cookie, the value…we want to assign to that name,…and then the expiration.…That is, we can control how long these…cookies stick around for.…We'll talk a bit more about the expiration in a minute,…but just know that you can choose whether this cookie…sticks around for a day, or whether it should…stick around for 10 years.…
It's up to you.…There are a few other arguments you can provide as well.…Here's a full list of all of them.…We've got name, value, and expire.…But then after that you can also…specify the path and the domain.…The path is the path on the server…to which the cookie's available.…So for example, we could have a cookie that's…only available if our path is in the staff area.…Domain would be typically the entire domain,…the entire website.…But we can also limit it to a certain subdomain…
- 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
Skill Level Beginner
1. Create a Content Management System
2. Build Dynamic Content Navigation
3. Use Context and Options
4. Cookies and Sessions
5. Regulate Page Access
6. Nesting Related Resources
Next steps1m 15s
- 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.