title: codeigniter and ajax cannot access the post
body: <p>On my website I am using ajax post request to show content around my site, this is done using this code, </p>
  
  <pre><code>$("a.contentlink").click(function(ev) {
      ev.preventDefault();
      $('#main_menu').hide();
      var url = $(this).attr("href");
      var data = "calltype=full&amp;url="+url;
      $.ajax({
          url:url,
          type: "POST",
          data: data,
          success : function (html) {
              $('#left-content-holder').html(html);
          }
      })
  });
  </code></pre>
  
  <p>as you can see I am passing the url into the `$_POST' and I can access this in the method the javascript calls, this method is called get_content_abstract and looks like this,</p>
  
  <pre><code>public function get_content_abstract() {
  
      $this-&gt;load-&gt;model('content_model');
      if($this-&gt;input-&gt;post('calltype') == "abstract"){
          if($query = $this-&gt;content_model-&gt;get_content_by_id($this-&gt;uri-&gt;segment(3))) {
              $data['abstract'] = $query;
          }
          $this-&gt;load-&gt;view('template/abstract', $data);
      }
          elseif($this-&gt;input-&gt;post('calltype') == "full") {
              if($query = $this-&gt;content_model-&gt;get_content_by_id($this-&gt;uri-&gt;segment(3))) {
                  $data['full'] = $query;
              }
              $this-&gt;load-&gt;view('template/full-content', $data);
          }
  
  }
  </code></pre>
  
  <p>How ever I have no added a new function that will allow the user to save the content to 'bookmarking system', however in my method I cannot access the post using codeigniters <code>$this-&gt;input-post('url')</code> (where URL is the one of peices of data passed in the javascript), it says that the post is empty when I var dump it, this is done using this method,</p>
  
  <pre><code>    public function love_this() {
      die(var_dump($this-&gt;post-&gt;input('url')));
  }
  </code></pre>
  
  <p>can anyone help as to why the post is empty in this love_this method?</p>