Solarpitch Posted December 18, 2006 Share Posted December 18, 2006 Hey Guys,In the application I am developing I need to allow users to add an item to a "quicklist" where the user can view the stored items later. Just like youtube implement thier quicklist. Would anyone be able to give me an overview on how to achieve this using session variables?I take it I would have a variable(array or something) that stores all the selected advertisments that the user wants to add to thier list. Carry that from page to page and then display in quicklist_items.php?Even example code would be fantastic!Cheers! Link to comment https://forums.phpfreaks.com/topic/31139-quickwishlist-using-session-variables/ Share on other sites More sharing options...
The Little Guy Posted December 18, 2006 Share Posted December 18, 2006 How much later do you want them to be able to view the items? If its going to be maybe a day or two later, you will want a database, otherwise if it is all at once, before they logout of there browser, then sessions would be fine, But it would be best to know this.You could also use a database for short term too, which could possibly be easier for managing items, but SESSIONS would be faster. Link to comment https://forums.phpfreaks.com/topic/31139-quickwishlist-using-session-variables/#findComment-143818 Share on other sites More sharing options...
Solarpitch Posted December 18, 2006 Author Share Posted December 18, 2006 Na . . I wont be using a database because I want visitors to the site to be able to use this service too. So I know that if they close thier session or exit the page the list will be lost . . thats not a problem. I am just kinda stuck on how to implement it :) Link to comment https://forums.phpfreaks.com/topic/31139-quickwishlist-using-session-variables/#findComment-143822 Share on other sites More sharing options...
The Little Guy Posted December 18, 2006 Share Posted December 18, 2006 you could take a session, and add an array into that sesssion so basically you will have an array of sessions, and one of the sessions will have an array of products. Link to comment https://forums.phpfreaks.com/topic/31139-quickwishlist-using-session-variables/#findComment-143830 Share on other sites More sharing options...
Solarpitch Posted December 18, 2006 Author Share Posted December 18, 2006 ummm..So, I have something like this..Ad 1 ---> Add to Quicklist User selects, adds to quicklist_variableAd 2 ---> Add to QuicklistAd 3 ---> Add to Quicklist User selects, adds to quicklist_variableAd 4 ---> Add to QuicklistAd 5 ---> Add to QuicklistSo . . user has selected ads 1 and 3 to store in the quicklist. With ad id's of 1 & 3 respectively. These 2 ad id's are now stored in...quicklist_variable {1,3}See . . it all sounds good in my head, but I kinda need a hand putting it into code a little. Session variables are not my strong point . . . at ALL! :( Link to comment https://forums.phpfreaks.com/topic/31139-quickwishlist-using-session-variables/#findComment-143842 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.