need help to send variable from javascript to PHP
<p>i try to send some data from html to process page. i want to do this use javascript. 
the javascript is:</p>

<pre><code>     $('#search').click(function(){
             var param = serialize({
                        action:"searchmodelqp",
                        jhead:"aaData",
                        month:$("#search_month").val(),
                        year:$("#search_year").val(),
                        export:"excel"
                        });
$('#link2excel' ).replaceWith("&lt;div id='link2excel'&gt;&lt;a href='shows_merchan.php?" + param + "'  target='_blank'&gt;Export result as Excel file&lt;/a&gt;&lt;/div&gt;");
            });
</code></pre>

<p>and i send it to this:</p>

<pre><code>if(getVar('export')=='excel'){
                $expexcel = 'excel';
                } else {
                $expexcel=0;
}
switch(getVar('action')){
           case 'searchmodelqp':                             
                   modelqp(getVar('jhead'),getVar('month'),getVar('year'),getVar('export'));
                   break;
           }

function modelqp($jsonhead,$month, $year,$export){
                $Month = mysql_real_escape_string($month);
                $Year = mysql_real_escape_string($year);
                switch($jsonhead){
                        case 'aaData':
                                //i put mysql query here
                        break;
                        }

if($export==0) {
          //do something
} else {
        //do something
}
</code></pre>

<p>how do i do to make it clear?because i have no result for this(script do nothing).</p>
