title: Ajax with Codeigniter not working
body: <p>I want to make an ajax request and it wont work. This is my code:</p>
  
  <pre><code>function loadSingleProductPaso1(div_loading,div_id,index, json,ajaxurl){
  $.ajax({
      type: "POST",  
      url: ajaxurl, //the url is http://www.mysite.com/controller/function
      data: "ajax=true&amp;precio="+JSON.parse(json[index]).miprecio,
      success: function(msg){
               ...
              } 
      }
  });  
  </code></pre>
  
  <p>}</p>
  
  <p>The thing is, when I add a '?' to the data element (data: "?ajax=true&amp;..."), it works, but sends a $_POST['?ajax'] variable.</p>
  
  <p>I really don't understand what am I doing wrong.</p>