Is it possible to transfer javascript value to PHP? <blockquote> <p><strong>Possible Duplicate:</strong><br> <a href="http://stackoverflow.com/questions/2338942/access-a-javascript-variable-from-php">Access a JavaScript variable from PHP</a> </p> </blockquote> <p>Let's say I have the following javascript:</p> <pre><code>&lt;script&gt; var today = new Date(); var dd = today.getDate(); var mm = today.getMonth()+1; //January is 0! var yyyy = today.getFullYear(); if(dd&lt;10){dd='0'+dd} if(mm&lt;10){mm='0'+mm} today = mm+'/'+dd+'/'+yyyy; &lt;/script&gt; </code></pre> <p>Now I want to get the value of today variable into PHP.</p> <pre><code>$cur_date = '&lt;script type="text/javascript"&gt; document.write(today) &lt;/script&gt;'; echo "current date: $cur_date"; $checkin = strtotime($cur_date); </code></pre> <p>Although I can output the current date but how can I transfer it to $checkin variable with strtotime function?</p>