How do I assign a javascript variable to a PHP variable?
<p>I have a javascript variable which holds some information and I want that to assign in a PHP variable. Here is what I am using:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function redirectToFacebook()
{
    var facebookMessage = encodeURI(document.getElementById('txt_msg').value);
}
&lt;/script&gt;

&lt;?php
    $_SESSION['sess_facebook_message'] = facebookMessage;
?&gt;
</code></pre>

<p>Any help is really appriciable.</p>

<p>Thanks in advance</p>
