Page 1 of 1

COnstant error. Due to page refs?

Posted: Thu Feb 16, 2006 1:32 pm
by Dopple

Code: Select all

$page = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];
   if (!ereg($page, $_SERVER['HTTP_REFERER']))
      $errors[] = "Invalid referer\n";
This code is to make sure that the info from my form is posted from my form. The only problem is it's constantly throwing up the invalid referer error. I'm assuming this is to do with the way the php code is actually embedded in a user difined tag and called for? If anyone could suggest an alternative I would be very greatful.
:)