Having a problem with a CMS module that is loading twice. Here is an example of what the page loading look like:
index.php:
include("modules/MODNAME/FILENAME.php"); //
echo $content;
FILENAME.php:
include("modules/MODNAME/pages/FILENAME2.php");
$content = page_function();
return $content;
FILENAME2.php:
page_function() {
mail("$email", "Some Subject", $message, $headers)
$content = "thanks";
return $content;
}
What is happening is that the email is being sent out twice.
Any ideas on where the reload is occuring?