Welcome Guest, Not a member yet? Register   Sign In
Prevent double insert at same time
#7

using a js client side verification isn't efficient nor secure.

to prevent the form being submited twice with same data one way is to use CI4 CSRF security

set Config/Security.php $regenerate = true
put a CSRF token in your form
set a CSRF filter on your POST route or check CSRF token in your controller on POST

https://codeigniter.com/user_guide/libra...urity.html

you may also set the db column(s) as unique so if one user try to submit dupplicate data with a valid CSRF the db will not accept them
Reply


Messages In This Thread
RE: Prevent double insert at same time - by cha - 01-16-2025, 02:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB