resolve ajax failure in codeigniter 3 view page? |
in codeigniter 3 view page i have following to edit comments :
PHP Code: function toggleEdit(commentId) { but ajax failed to activated while get_csrf_token/?_=1720512009436 is retrived successfully when i check. how should i resolve that?
Well, not sure about CI3 but with CI4 I would add :
Code: <input type="hidden" class="txt_csrfname" name="<?= csrf_token() ?>" value="<?= csrf_hash() ?>" /> Code: $(document).ready(function(){
Correct way to re-generate CSRF for sequential AJAX calls
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |