on the submit button in a form in Flash CS3 I have this:
on (press) {
function doSubmit()
{
userData = new LoadVars();
userData.fullName = fullName.text;
userData.desiredPrice = desiredPrice.text;
userData.acreage = acreage.text;
userData.phone = phone.text;
userData.altphone = altphone.text;
userData.email = email.text;
userData.chat = chat.text;
userData.radioGroup = radioGroup.getValue();
userData.location1 = location1.text;
userData.send("chad.php", "", "post");
}
doSubmit();
gotoAndStop(2);
}
It works fine as far as the chad.php file. The thing is, this swf is placed on a page and instead of stopping on frame 2 (as above) the whole page leaves…as if it expects the chad.php to return a page.
This has never worked like this before. I use a basic email script to capture and send data and the flash file goes to the next frame and stops.
Now, it doesn’t and I’m wondering why? Very basic PHP:
<?
$name = $_POST['fullName'];
$acreage = $_POST['acreage'];
$radioGroup = $_POST['radioGroup'];
$location1 = $_POST['location1'];
$desiredPrice = $_POST['desiredPrice'];
$phone = $_POST['phone'];
$altphone = $_POST['altphone'];
$email = $_POST['email'];
$chat = $_POST['chat'];
$message = "$radioGroup
";
$message .= "$name
";
$message .= "$phone
";
$message .= "$altphone
";
$message .= "$email
";
$message .= "$acreage
";
$message .= "$desiredPrice
";
$message .= "$location1
";
$message .= "$chat
";
$body = $message;
mail('kelly@thumbslinger.com', 'latest chad', $body);
?>
So I’m trying to understand why a new page loads rather than just the Flash part going to the next frame.
The basics I’ve used is at http://www.fitmaven.com and [URL=“http://www.sapphiremonkey.com/”]www.sapphiremonkey.com where one can sign up for the newsletter. Small bit of Flash, upon submit, the mail is sent and it stops on frame 2.
?