javascript pass var to php
<p>would it be possible to pass the contents of var <code>reason</code> to action=report?</p>

<pre><code>function redirectConfirm(url)
{

var msg = "Are you sure?";
var reason = prompt("Reason");

if (confirm(msg))
{
    location.href=url;
}
}
</code></pre>

<p>And link</p>

<pre><code>&lt;a onClick="javascript:redirectConfirm('thread.php?id=$id&amp;action=report');"&gt;Report post&lt;/a&gt;
</code></pre>
