I have 3 online forms that latley have been hit a lot. So I built the mailers into a class and then the form processing page runs this
<?php
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "http://www.domain.com/form.php")
{
require_once('Classes/class_mailer.php');
$mailer = new emailer;
$mailer->is_mailer();
}
else
{
$redirect = "http://www.domain.com/Error.php";
header(sprintf("Location: %s", $redirect));
}
?>
Should this work, or is there a go around I am missing?
Thanks,
Josh