would it be possible to pass the contents of var reason to action=report?
function redirectConfirm(url)
{
var msg = "Are you sure?";
var reason = prompt("Reason");
if (confirm(msg))
{
location.href=url;
}
}
And link
<a onClick="javascript:redirectConfirm('thread.php?id=$id&action=report');">Report post</a>
You can pass it as query string:
Later in PHP, you can get it through
$_GET: