![]() |
Multiple record insertion prevent - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Multiple record insertion prevent (/showthread.php?tid=79624) |
Multiple record insertion prevent - pippuccio76 - 07-09-2021 HI , sorry for english , if i press send form button several time i have an insertion for every button press , how can i prevent it?
RE: Multiple record insertion prevent - InsiteFX - 07-09-2021 How to prevent form from submitting multiple times from client side? RE: Multiple record insertion prevent - pippuccio76 - 07-09-2021 (07-09-2021, 05:25 AM)InsiteFX Wrote: How to prevent form from submitting multiple times from client side? Validation prevent form submitting ? Or must i use ever js ? RE: Multiple record insertion prevent - paliz - 07-09-2021 Code: prevent with js RE: Multiple record insertion prevent - ikesela - 07-09-2021 disable button after press (use JS) RE: Multiple record insertion prevent - includebeer - 07-09-2021 Disabling the button with JS is good for the client side validation and for UX (user experience). But you can also add a CSRF token to your form to reject the other requests. Only the first one will have a valid token and the other will be rejected. Some people (or bots) disable JS, so it's always a good idea to validate data on the server. |