princeofpersia Posted October 24, 2011 Share Posted October 24, 2011 Hi guys, I was wondering if we have table of seats in a cinema (which makes the quantity to 1) and two users are booking the same seat at the same time on our application. How can we prevent that? I though if we create a session or even update that seat row and then if user doesn't finish the booking/or leave the browser on fora while in 10-15 minutes, that session still remains on. I'm sure we can expire that session how can we prevent both users have the same session and if one doesn't complete the purchase for any reason then how session can automatically update the database after that 15 minutes? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/249721-quick-question-about-a-session/ Share on other sites More sharing options...
Drummin Posted October 24, 2011 Share Posted October 24, 2011 I would base it off a database where actual orders are logged and not a session. Link to comment https://forums.phpfreaks.com/topic/249721-quick-question-about-a-session/#findComment-1281811 Share on other sites More sharing options...
princeofpersia Posted October 24, 2011 Author Share Posted October 24, 2011 Thats what i though but what if a users doesn't complete and don't close the browser? Link to comment https://forums.phpfreaks.com/topic/249721-quick-question-about-a-session/#findComment-1281813 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.