title: jquery check radio button
body: <p>PHP keeps saying <code>unidentified index: gender</code>?  I'm not sure where the error is.</p>
  
  <p>HTML:  </p>
  
  <pre><code>&lt;label&gt;Gender:&lt;/label&gt; &lt;input type="radio" name="gender" value="1"&gt;Male &lt;input type="radio" name="gender" value="0"&gt;Female
  </code></pre>
  
  <p>JQuery:</p>
  
  <pre><code>gender: $("input[@name=gender]:checked").val()
  </code></pre>
  
  <p>PHP:</p>
  
  <pre><code>$gender = $_POST['gender'];
  if($gender == '') {
    echo 'Please select gender';
  } 
  </code></pre>