Allow guests to save favourite pages?
Cookies, or even HTML5 local storage, seem like a good way to implement this. Here’s some basic code that could serve as a starting point. Post IDs are stored as CSV in the cookie. // Load current favourite posts from cookie $favposts = (isset($_COOKIE[‘favposts’])) ? explode(‘,’, (string) $_COOKIE[‘favposts’]) : array(); $favposts = array_map(‘absint’, $favposts); // … Read more