glenelkins Posted December 31, 2008 Share Posted December 31, 2008 Hi I need to use mysql temporary tables to store data from one form to the next until the system reaches the end and places everything into the real tables. Though when the script reloads to the next form ( screen ) the connection to the database will be lost and the temporary table will vanish? Does mysql_pconnect() solve this? I mean does it keep the same connection open even after the page refreshes? Link to comment https://forums.phpfreaks.com/topic/138983-question-about-mysql_pconnect/ Share on other sites More sharing options...
glenelkins Posted December 31, 2008 Author Share Posted December 31, 2008 - Link to comment https://forums.phpfreaks.com/topic/138983-question-about-mysql_pconnect/#findComment-726868 Share on other sites More sharing options...
Mchl Posted December 31, 2008 Share Posted December 31, 2008 I think storing this data using sessions is a better idea. Persistent connections can still be closed while your users are filling the forms. Link to comment https://forums.phpfreaks.com/topic/138983-question-about-mysql_pconnect/#findComment-726870 Share on other sites More sharing options...
PFMaBiSmAd Posted December 31, 2008 Share Posted December 31, 2008 Just store your data in the actual table but use a "status" column to indicate it is "in-progress". Then simply switch the status to "final" once everything has been entered. You will find this results in the simplest code. Link to comment https://forums.phpfreaks.com/topic/138983-question-about-mysql_pconnect/#findComment-727013 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.