开发者

How to Maintain session in cakephp

I am very new to 开发者_如何学Ccakephp,my application is basically online registration ,it includes two steps in registering,i have two forms to capture data.i want to start session from the first step of registration and i need to store all the forms data in session attributes. after submission of second form data,the session data should save in database. please explain me in steps to do the above task.


you need this https://github.com/jaredhoyt/cakephp-wizard


Steps to save a form data

1) Crate view of the Form 2)On submit of the first step call an action and save your data in session array using this->Session->write('var_name',$array); 3) now on second step of the form submit call the same action and but check fr the condition is this a final submit ,and also session is not empty add those data to the sessions also and then add tht whole session array into database using Insert operation cakePHP 4) after saving the data empty the session array

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜