PHP Code:
//redirect to index if someone is posting variables
if($_SERVER['REQUEST_METHOD'] == "POST"){
$referer = parse_url($_SERVER['HTTP_REFERER']);
echo $referer['host'];
exit;
}
i would do something like this to make sure $referer['host'] is sending what you think it is ... or to figure out what it is sending when it's not working as expected.