jpl225 Posted September 9, 2009 Share Posted September 9, 2009 Hi! Is there any way to keep in memory $_POST-information? I mean, that when I use form to get the data and process it in another file everything is allright. But if I go to next file it do not have that information anymore? The reason I need this is that I am building a shopping cart and first user select from item-group to see items (that is he sees only items from that group, not all items). After seeing items he can put one or more into basket and there I got this problem. $_POST-information is gone for good. So is there a way to keep it in variable or file or ...? Jyri Link to comment https://forums.phpfreaks.com/topic/173699-saving-_post-information/ Share on other sites More sharing options...
SilveR316 Posted September 9, 2009 Share Posted September 9, 2009 No, $_POST just exists on the first page after the request is submitted. What happens with the data after that is up to you. You can look at storing the data from $_POST in sessions ($_SESSION) to make it available to later requests. Link to comment https://forums.phpfreaks.com/topic/173699-saving-_post-information/#findComment-915628 Share on other sites More sharing options...
minneyx Posted September 9, 2009 Share Posted September 9, 2009 Hello, I made a shopping cart for a couple of websites before. I made the user register before being able to add products to their cart. When adding to cart I would have them sent to a mysql database. Most people use cookies to store the users shopping list. Hope this helps. Link to comment https://forums.phpfreaks.com/topic/173699-saving-_post-information/#findComment-915734 Share on other sites More sharing options...
chmpdog Posted September 10, 2009 Share Posted September 10, 2009 If the data is sensitive I would use sessions because cookies can be be easily edited. (cookiemonster firefox addon) Link to comment https://forums.phpfreaks.com/topic/173699-saving-_post-information/#findComment-915810 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.