php - Ajax call controller function -


this jquery code

$(document).foundation() //sorting lists , add them database $(function() { $('#sortable').sortable({     axis: 'y',     opacity: 0.7,     handle: 'span',     update: function(event, ui) {         var list_sortable = $(this).sortable('toarray').tostring();         // change order in database using ajax         $.ajax({             url: "index.php/lists/update_order",             type: 'post',             data: {list_order:list_sortable},             success: function(data) {                 //finished             }         });     } }); }); 

it works if put csrf false in config, possible leave true , open controller function? if enable true 403 error.

also, in controller what's best way of updating list_order in lists table?


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -