My Favorites from page list

Permalink
Hello, I have a property rental site where after searching you are presented with a list of results. I want to allow the user to check a box to add to "My Favorites" page. I don't want them to have to login or anything. I just want it to store in the current session.

Can anyone point me in the right direction here?

 
hutman replied on at Permalink Reply
hutman
You could setup a tools file which would stick whatever the result object is into the session.

Something like
$id = $_POST['id'];
$_SESSION['my_favorites'][] = $id;

This question seems a little vague in what the result is and what you're trying to do with the results once they're in the session.
GrizzlyAdams replied on at Permalink Reply
Basically, from the pagelist of results I need them to click a Star. And via Ajax I guess, add to a "My Favorites" page. And also be able to uncheck the star and have it disappear.
hutman replied on at Permalink Reply
hutman
Setting up a tools file with that code should do just fine then.
GrizzlyAdams replied on at Permalink Reply
Hmm, never setup a tools file before. Any guidance would be most appreciated.