Code igniter get ajax value from view to controller

后端 未结 4 1783
忘了有多久
忘了有多久 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:28

    Try this one , this is ajax call

     $.post('example/name',{send:send}, 
              function(data) {
    
          });
    

    then access it using post into your controller like this

    class Example extends CI_Controller {
    function name() {
        $_POST['send'];
      }
    }
    

提交回复
热议问题