See how cookie values can only be unset by replacing the data or expiring the cookie.
- [Instructor] In this movie, we're going to talk…about how you unset cookie values,…because it's not as obvious as you might first think.…A lot of beginners think that you can unset a cookie…by using PHP's unset function.…After all, that works to unset the value of a variable,…it even works to unset the value of an associative array,…and after all, this is an associative array…stored in the super global cookie.…But this will not work.…Why not?…Well, remember, the super global cookie contains…the values received from the previous request.…
That's all it is.…Those values came in in the request, PHP grabbed them,…put them all together, and put them here…in the associative array so we'd have easy access to them.…It has nothing to do with communicating to the browser…that it should delete the data that it has stored.…All it would do is simply modify the associative array…that we have, and the next request that came in,…the browser would send it's stored data in again.…The cookie would not have gone away.…Instead, we need to actually communicate…
- 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
PHP with MySQL Beyond the Basicswith Kevin Skoglund10h 26m Intermediate
MVC Frameworks for Building PHP Web Applicationswith Drew Falkman2h 57m Intermediate
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?
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.