title: how to use jQuery $.post() Method in codeigniter?
body: <p>i am trying to call a method of a controller which method will not return anything but it will process the data.
  my jquery method is like </p>
  
  <pre><code>    $(document).ready(function(){
      $("img").on("click", function(){
          var number = $("#ID").val();
          $.post("&lt;?php echo site_url('promo/getinfobyid()'); ?&gt;", {id: number});
  
      });});
  </code></pre>
  
  <p>and my controller method is like </p>
  
  <pre><code>public function getinfobyid()
      {
          //$id=$_POST['id'];
          echo 'Selected '.$id;
  
      }
  </code></pre>
  
  <p>how i will get the data in getinfobyid()??</p>