Sessions in Codeigniter -


i using sessions store data multi step form when user completes 3 sections of form information inserted in database. have built form user can go stage , modify information have submitted, thing though, values repopulate form stored in sessions if user leaves form page , goes elsewhere in website , returns form information still in form…is there better way this? want data destroyed if leave form…

thanks

assuming form exists in 1 controller , isn't spread across multiple ones, unset session values in __construct of every other controller. (you extend base controller if have lots save hassle of adding functionality many.

that way if user visits section, values lost, providing remain within "form" can remain intact.


Comments

Popular posts from this blog

android - Spacing between the stars of a rating bar? -

aspxgridview - Devexpress grid - header filter does not work if column is initially hidden -

c# - How to execute a particular part of code asynchronously in a class -