Jump to content

problems receiving email form from flash


Visualanté

Recommended Posts

I created a flash form to email a response back from a website. I recieved the email with all the headings of the responses, but , none of the variables appear in the email. I used input text boxes and they match up with the php form variables. I checked the spelling and cannot figure out whats going on . So the summit works and I recieved the email but I just don't get the users information. Below here is the programming. im using flash8 exporting actionscript1

//code//
<?php

$TextVariable = '&results=';

$response = 'Data Sent. Thank You..';

echo $TextVariable;

echo $response;

$recipient .= "my email" ;

$subject = "Contact from Site";

$message .= "Name: $fname

Email: $email

Phone: $phone

Party: $party";

$headers .= "From: $name <$email>n";

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

?>
//code//


in flash

//code//
on (release) {

// logical operator makes sure the textfield is not blank. IndexOf checks for "@" and "." characters in textfield

if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {

results = "Please check your e-mail address.";

} else if (!party.length) {

results = "Please enter your party type.";

} else if (!fname.length) {

results = "Please enter your name.";

} else if (!phone.length) {

results = "Please enter your phone.";

} else {

loadVariablesNum ("http://eurobarmilwaukee.com/booking.php", 0, "GET");

results = "Sending Data...";
gotoAndPlay(51);

}

}
Link to comment
https://forums.phpfreaks.com/topic/33839-problems-receiving-email-form-from-flash/
Share on other sites

ever since i went to flash8 my php doesnt work...was their a change.....now im trying

php
//code//
on (release) {
if (fname eq "" or phone eq "" or email eq "" or message eq "") {
stop();
} else {
loadVariablesNum("3point.php", 0, "POST");
gotoAndStop(41);
}
}
//code//

php
//code//
<?php
$to = "myemail";
$msg = "$fname\n\n";
$msg .= "$phone\n\n";
$msg .= "$email\n\n";
$msg .= "$message\n\n";
mail($to,"Cincere Feedback", $msg, "From: SimplyCincere\nReply-To: $contactemail\n");
?>
//code//
I get the impression that you haven't read any of the previous posts I've made. 

your actionscript should look like this:
[code]
varsToSend = new LoadVars();
varsToSend.fname="blah";
varsToSend.phone=1234567;
// etc...then...
varsToSend.send("3point.php","post");
[/code]

your php code
[code]
<?php
  if ($_POST) {
      $to = "myemail";     
      $subject = "hi am spamming you";
     
      $msg  = $_POST['fname'] . "\n\n";
      $msg .= $_POST['phone'] . "\n\n";
      // etc...

      $headers = "From: SimplyCincere\n";
      $headers.= "Reply-To: [email protected]\n";

      mail($to, $subject, $msg, $headers);
  }
?>
[/code] 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.