scripterdx Posted November 12, 2009 Share Posted November 12, 2009 hi, i´ve made a simple wishlist using sessions, it works fine, but when i want to share my list on facebook or something like that only shows the results of my wishlist to me my frinds see a blank app. help. Quote Link to comment https://forums.phpfreaks.com/topic/181245-a-unique-wishlist/ Share on other sites More sharing options...
Garethp Posted November 12, 2009 Share Posted November 12, 2009 Your sessions can't be viewed by other people. This is session lesson number 1. You need to store it elsewhere. Lesson number 2 is that sessions are temporary, and are not useful for long term lists. Now, you DO need to post all your code for us to help you Quote Link to comment https://forums.phpfreaks.com/topic/181245-a-unique-wishlist/#findComment-956146 Share on other sites More sharing options...
rlelek Posted November 12, 2009 Share Posted November 12, 2009 Hey there, One thing before we get started... *always post your code* (and comment what you expect to get and what you actually get too, for future posts). it never hurts to have more information... Firstly, Sessions are really just temporary storage. They are highly unreliable for permanent storage as the use may clear their browser history, or be on a different computer, and everything is wiped/inaccessible. Don't get me wrong, sessions are great, but you should use the right tool for the job. Wishlists lean more to the permanent storage side, although temporary storage measures, like sessions, can be used to build the wishlist. Definitely look into some long term storage solution, whether it is a file or a database, to store these wishlists. That way, when a user visits your site, you can always regenerate their wishlist, and you are not dependent on them keeping their browser files... Sessions and other temporary storage solutions (variables are one, they are destroyed at the end of the PHP file execution) are sort of the middle men of the PHP game. Okay, so, here are some solutions to use *in conjunction with* sessions. - Databases - MySQL - PostgreSQL - XML There are others, but they may be more trouble than they are worth. MySQL has a lot of support in the PHP community, so i'd go with that one, since it'll be easier to get help. Here's a link to get you started: http://www.tizag.com/mysqlTutorial/ More topics are covered on the left hand side or the continue button on the bottom. Basically, your goal should be to: - Uniquely identify the list (Primary Key) - Tie a user to the list in some way (User id column) - Serialize the array of items in the list, into the database Hope this helps somewhat, i'm sort of taking a shot in the dark as to what it is you are after and your PHP coding comfort level. If you have any questions, I or the other nice people at PHPFreaks will be happy to help out! Also, make sure to mark the thread as "Solved" if someone answers your question. Ryan Quote Link to comment https://forums.phpfreaks.com/topic/181245-a-unique-wishlist/#findComment-956156 Share on other sites More sharing options...
scripterdx Posted November 12, 2009 Author Share Posted November 12, 2009 i´didn´t posted the code becuase works fine, gets the items and store them on mi DB, each id has it´s own items, now the next step is to make it unique on flash, so i´m thinkin flashvars. thanks anyway. Quote Link to comment https://forums.phpfreaks.com/topic/181245-a-unique-wishlist/#findComment-956167 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.