Codeigniter ajax request not working
<p>I send one request to controller ,And When I alert(tele) to controller it is display values,But in controller it shows empty,,</p>

<p>But Other date1 and date2 are working..</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function(){
$('#buttonsearch').click(function(){
var date1=$("#date1").val(); 
var date2=$("#date2").val();vartele=$("#tele").val();
 alert(tele);
 $.ajax(
 {
 type: "POST",
 url: '&lt;?php echo site_url('totalorders/orderajax'); ?&gt;',
 data: 'date1=' + date1 + '&amp;date2='+ date2 +'&amp; tele ='+ tele,
 success: function(data)
 {
 alert(data);
 $("#customers2").html(data);
 }}); });});
&lt;/script&gt;
</code></pre>

<p>controller code..</p>

<pre><code> public function orderajax()
    {

         $this-&gt;load-&gt;database();
        $this-&gt;load-&gt;library('session');
        $date1=$this-&gt;input-&gt;post('date1');
        $date2=$this-&gt;input-&gt;post('date2');
        $tele=$this-&gt;input-&gt;post('tele');
        $data['tele']=$tele;
        if(($date1 != '') &amp;&amp; ($date2 != '') &amp;&amp; ($tele == ''))
        {

            $data['orders'] = $this-&gt;orderdetails-&gt;get_ajaxsearchorders($date1,$date2,$tele);
        }
        else 
        {
            $sss=$tele;
            $data['orders'] = $this-&gt;orderdetails-&gt;get_ajaxsearchorders1($sss);
        }
        $this-&gt;load-&gt;view('orderviewajax',$data);
    }
</code></pre>

<p>can you guys help me where i was wrong..</p>

<p>Note : only 'tele' value is not working date1,date2 are working..</p>