Code igniter get ajax value from view to controller

后端 未结 4 1907
忘了有多久
忘了有多久 2021-01-07 06:39

How do I get send in my controller? This is what, I have tried out:

Ajax

$.ajax({
    type: \"POST\",
    url: \"e         


        
4条回答
  •  梦谈多话
    2021-01-07 07:08

    Seems that you don't send your data properly. Try this:

    $.ajax({
        type: "POST",
        url: "example/name",
        data: {send: send},
        success: function(value) {
    
        }
    });
    

    In this case you will be available as $_POST['send'].

提交回复
热议问题