Multi step form submission |
[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
[eluser]cereal[/eluser]
Use set_userdata() not set_flashdata so you can bring around all the data you need: http://ellislab.com/codeigniter/user-gui...sions.html
[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-gui...sions.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?
[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 |
Welcome Guest, Not a member yet? Register Sign In |