Same form - two domains but one won't send
Hi,
I have the form on a website and two domains point to that one website. When I send the contact form from domain one (contact.php) the form sends fine and I get the 'thankyou' page. But if I happen to have accessed the site from the other domain (contact.php) the form won't send.
Does anyone know a way around this? I need the form to work no matter which domain is the http referrer.
I suspect I need to change something on this line:
if ((($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos(urldecode($_SERVER["HTTP_REFERER"]), urldecode($_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"])) > 0) && isset($_POST))) {
but I'm not sure what and the site is live.
Any help is appreciated.