Help With A Broken Button

I have an email form on my flash site that I use with php. I have the web site set up to where my index file loads pages 1 through 7 in to a container. When I just load page 7 without loading it through the index, the email form works. But when I view page 7 by loading the index the send button to the email form does nothing. I am guessing this is just a problem with changing the button actionscript but for some reason I can’t fix it. Would I have to place “_parent” in the code since I’m now loading from within another swf? Any help would be greatly appreciated.

Here is the actionscript on the Send button.

on (release) {
    form.loadVariables("email.php", "POST");
}

and here is the php file


<?php


$sendTo = "info@mydomain.com";
$subject = "Email From Web Page";
$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">
";
$headers .= "Reply-To: " . $_POST["email"] . "
";
$headers .= "Return-path: " . $_POST["email"];
$message = $_POST["message"];

mail($sendTo, $subject, $message, $headers);

?>