To assign javascript value to a php variable in the same page
<p>I have a page with php and javascript. In the php section i need to call a function with an argument $arg, Now $arg is the problem, $arg is actually value of a dropdown option in the same page . Here is what i am trying to accomplish.</p>

<pre><code> &lt;?php include("aclass.php")?&gt;
&lt;script language="javascript"&gt;
function getoption(val){
}
&lt;/script&gt;
&lt;html&gt;
 &lt;select name="sel" onchange="getoption();"&gt;
   &lt;option value="1"&gt;One&lt;/option&gt;
   &lt;option value="2"&gt;Two&lt;/option&gt;   
&lt;/html&gt;
&lt;?php 
$object=new a;
$object-&gt;calculate($arg);
 ?&gt;
</code></pre>

<p>// Here the issue is $arg should be the value i select in dropdown, $arg should be 1 if i select One and should be 2 if i select Two in dropdown.</p>

<p>" Is  there a possibility to pass the javascript value 'val' to php variable $arg "</p>
