get selected value of radio button onclick of submit and pass value to a function
<p>I am doing some work in PHP. I have two php page</p>

<p>index.php</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;script&gt;
function getVote(int)
{
if (window.XMLHttpRequest)
  {// code for IE7+, Firefox, Chrome, Opera, Safari
  xmlhttp=new XMLHttpRequest();
  }
else
  {// code for IE6, IE5
  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  }
xmlhttp.onreadystatechange=function()
  {
  if (xmlhttp.readyState==4 &amp;&amp; xmlhttp.status==200)
    {
    document.getElementById("poll").innerHTML=xmlhttp.responseText;
    }
  }
xmlhttp.open("GET","poll-vote.php?vote="+int,true);
xmlhttp.send();
}
&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h3&gt;Is this correct? &lt;/h3&gt;
&lt;div id="poll"&gt;

&lt;form&gt;
Yes:
&lt;input type="radio" name="vote" value="0"&gt;
&lt;br&gt;No:
&lt;input type="radio" name="vote" value="1"&gt;
&lt;input type="submit" value="Forward" onclick="getVote(value);"&gt; 
&lt;/form&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>on click of submit button I need to get the value of selected radio button and pass it to the function.</p>

<p>Please help me</p>
