When submitting form data from Flash to a php script, the playhead doesn’t stop on frame 2 as it should.
The php code I’m using for this test is:
Code:
<?
$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);
?>
The Actionscript in Flash I’m using is this on the submit button:
**Code:**
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.chat = chat.text;
userData.radioGroup = radioGroup.getValue();
userData.location1 = location1.getValue();
userData.send(“chad.php”, “”, “post”);
}
doSubmit();
_root.gotoAndStop(2);
}
I had the doSubmit on the timeline of frame 2, but it never sent data that way.
It’s supposed to goto and stop to frame 2 but it pauses on frame 2 and then the screen disappears. I have a stop as you see above and on the main timeline, on frame two, I have this:
stop();
_root.goBack.onRelease = function() {
gotoAndStop(1);
}
Even taking the stop out of the on(press) doesn’t do anything… it just disappears after the data is sent. Which, works by the way…
Any insights? Thanks