gibbonuk Posted July 29, 2011 Share Posted July 29, 2011 Hi, just wanted to know what the best mothod is. In my php app, when the user "logs in" it drags some parameters out of a mysql database based on the user. These parameters will then be used in calculations on that page which is refreshed alot. So, immidiatly i realise once the user is logged in, and the parameters are retrived, each time the page is releaded it will do that all over again, which is what i want, but also want a "fast" user experience and wondered if there would be a better way to store the parameters for that session rather than having to keep running an sql query and pulling them out, storing them back into arrays etc? Sould they be put into a session? The parameters arnt alot, 3 columns each with 16 params, resulting in 3 arrays of 16 parts. Thanks Andy Link to comment https://forums.phpfreaks.com/topic/243171-storing-data-per-session/ Share on other sites More sharing options...
WebStyles Posted July 29, 2011 Share Posted July 29, 2011 yeah man, just store in a $_SESSION variable and before the part that pulls them out of the database, check if that var already exists or not. Link to comment https://forums.phpfreaks.com/topic/243171-storing-data-per-session/#findComment-1248952 Share on other sites More sharing options...
gibbonuk Posted July 29, 2011 Author Share Posted July 29, 2011 Spot on , cheers mate. Andy Link to comment https://forums.phpfreaks.com/topic/243171-storing-data-per-session/#findComment-1248953 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.