Multi step form submission - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Multi step form submission (/showthread.php?tid=36573) |
Multi step form submission - El Forum - 12-07-2010 [eluser]Ravi Bakraniya[/eluser] I am using a registration page having four steps and i am having a field called "Username" in first step and i don't want user to repeat the username, all the data should be added to the database in the fourth step. i have used session right now, and it works fine but the problem i am facing is about a lot of queries. i have used keep_flashdata() to keep the session alive, but it keeps the session only for the next server request so i have to repeat the code "keep_flashdata()" in every step. i am getting almost 100 queries fired at step3 while i have just 10 fields at step1 and i have written "keep_flashdata()" at step 2 and step3. as i know, i am getting these 100 queries because of this reason. I am very new to CI, please help Multi step form submission - El Forum - 12-07-2010 [eluser]cereal[/eluser] Use set_userdata() not set_flashdata so you can bring around all the data you need: http://ellislab.com/codeigniter/user-guide/libraries/sessions.html Multi step form submission - El Forum - 12-09-2010 [eluser]Ravi Bakraniya[/eluser] [quote author="cereal" date="1291756557"]Use set_userdata() not set_flashdata so you can bring around all the data you need: http://ellislab.com/codeigniter/user-guide/libraries/sessions.html[/quote] thanks for reply, it stores the fields to database by using set_userdata() and i don't want to storte. is there any other way? Multi step form submission - El Forum - 12-09-2010 [eluser]cereal[/eluser] This is not true, the session is stored to a cookie. The session can be stored to a database only if you create a ci_sessions table (or whatever you set on the config.php file), but the custom data is always saved in the cookie. Bye |