PHP get javascript variable value
<p>At first i have this script</p>

<pre><code>&lt;head&gt;
    &lt;script type="text/javascript"&gt;
        function test(work){
            document.getElementById("php_code").innerHTML="&lt;?php 

            *$job = work;*

            $sql="INSERT INTO event ( id, name, job, status)
             VALUES
             ('','$_SESSION[username]','$job','not verified')";
            $result = mysql_query($sql); 
            ?&gt;";
        }
    &lt;/script&gt;
&lt;/head&gt;

&lt;body&gt;
  &lt;button onclick='test(job1)'&gt;&amp;nbsp&amp;nbsp  Add  &amp;nbsp&amp;nbsp&lt;/button&gt;
&lt;/body&gt;
</code></pre>

<p>i need to pass the work value from javascript to $job in php.</p>

<p>Any ideas?</p>
