• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Refreshing re-enters the data in the db again and again. Help?

#3
[eluser]Otemu[/eluser]
Hi,

I paste you some code when I get home, but since I am at work I am unable to do that however I just basically give you the basic concept:

1. user loads signup page
2. controller returns view signup
3. user fills in signup form and submits
4.[optional] controller performs various validation on form (http://ellislab.com/codeigniter/user-gui...ation.html) validation class can also be used to check if username/email etc already exists in database and return error to user
5. controller now passes the form data to model
6. the model inserts data into the database
7. if successful the model redirects the user to the success page

user can now refresh success page as many times as they like without effecting database
Hopefully this is enough to solve your issue if not then let me know and I paste an example for you when I get home or if you can't wait just check out this tutorial http://net.tutsplus.com/articles/news/co...y-6-login/

Hope that helps


Messages In This Thread
Refreshing re-enters the data in the db again and again. Help? - by El Forum - 05-29-2012, 05:14 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.