Passing JavaScript Variables to PHP Session
<p>Why I do not get any printing on the screen (m1, m2 or m3)?</p>

<p>i.e. how can I pass JavaScript var to PHP Session. </p>

<pre><code>&lt;?php session_start(); ?&gt;

&lt;html&gt;
&lt;head&gt;

&lt;script type="text/javascript"&gt;
function disp_text()
   {
      var p = document.myform.mylist.value;
      &lt;?php $_SESSION['color'] ?&gt; = p;
      &lt;?php echo $_SESSION['color'] ?&gt;;
   }
&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;

&lt;FORM NAME="myform"&gt;
&lt;SELECT NAME="mylist" onChange="disp_text()"&gt;
&lt;OPTION VALUE="m1"&gt;Red
&lt;OPTION VALUE="m2"&gt;Blue
&lt;OPTION VALUE="m3"&gt;Green
&lt;/SELECT&gt;
&lt;/FORM&gt;
</code></pre>

<p>
</p>

<p>Thanks for any help.</p>
