My CodeIgniter CSRF + Form Helpers |
[eluser]skunkbad[/eluser]
[quote author="Linh Pham" date="1339566280"]Hi there, i have used this helper to prevent duplicate form submition, i tried 3 click times on the submit button and it does not work, so how to use this? submit to insert the record into the database and with 3 click times and had 3 same records, so that it's not good for my aim, i just want only record will be insert into db[/quote] I made my own CSRF library, and you can use it too if you want: https://bitbucket.org/skunkbad/community...s/csrf.php Use is really easy, especially if you use the MY_form_helper: https://bitbucket.org/skunkbad/community...helper.php All you have to do is load the library in your controller: Code: $this->load->library('csrf'); Then, to check for valid form submission: Code: if( $this->csrf->token_match ) CodeIgniter has it's own CSRF protection now, but this library can be used in older version of CI, or in combination with CI's CSRF protection. It's been fully tested and I use it every day. |
Messages In This Thread |
My CodeIgniter CSRF + Form Helpers - by El Forum - 02-11-2008, 10:05 AM
My CodeIgniter CSRF + Form Helpers - by El Forum - 02-28-2008, 10:53 PM
My CodeIgniter CSRF + Form Helpers - by El Forum - 02-21-2010, 03:10 AM
My CodeIgniter CSRF + Form Helpers - by El Forum - 09-27-2010, 11:05 AM
My CodeIgniter CSRF + Form Helpers - by El Forum - 06-12-2012, 10:44 PM
My CodeIgniter CSRF + Form Helpers - by El Forum - 06-12-2012, 11:25 PM
My CodeIgniter CSRF + Form Helpers - by El Forum - 06-13-2012, 02:24 AM
|