$.post, radio button value, jquery
<p>I have trouble to pass radio button value by using $.post
can anyone help me find out the problems?   </p>

<p>i got  Undefined index:gender</p>

<pre><code>&lt;?php
    $gender = $_POST['gender'];    
    if (!$gender) {
        echo $gender;
    }    
?&gt;

&lt;script type="text/javascript"&gt;
    function get(){
        $('#error').hide();

        $.post(
            'signup.php', 
            { gender:signup.gender.value },
            function(output){
                $('#error').html(output).fadeIn(100);
            }
        )       
    }
&lt;/script&gt;

&lt;form name="signup"&gt;
    &lt;input class="radio" type="radio" name="gender" value="male"/&gt; Male&lt;br/&gt;
    &lt;input class="radio" type="radio" name="gender" value="female"/&gt; Female
    &lt;input type="button" value="submit" onclick="get();" /&gt;
&lt;/form&gt;

&lt;div id="error"&gt;&lt;/div&gt;
</code></pre>
