PDA

View Full Version : This is a nightmare!



Travis Coats
05-25-2007, 07:01 PM
Topic: Flash Forms . . . Oh yeah, I am going there.:mad:

This is one of the largest misconstrued topics on the net. I have surfed page after page of useless, non sensual babble. I had, for a "brief" moment today, my flash contact form operable and now I am stumbling through the forests of actionscript looking for the breadcrumbs I had dropped. This was the code that made it work:

var DataSender:LoadVars = new LoadVars();

//code to set main variable with contained variables to bluehost

function sendForm() {
DataSender.sendtoemail = "travis@allinnia.com";
DataSender.Name = form.userName.text;
DataSender.Email = form.userEmail.text;
DataSender.Message = form.userComment.text;
DataSender.Music = form.music.selectedData;
DataSender.Favorite_Track = form.cFavorite.selectedItem.label;
DataSender.sendAndLoad("http://www.bluemail.com/bluemail",DataReciever,"POST");
}


// function that validates form with if statement\\
this.form.submitBtn.onRelease = function() {
if (form.userName.text == "" || form.userComment.text == "" || form.music.selectedData == undefined) {
gotoAndStop("error");
} else {
sendForm();
gotoAndStop("correct");
}
};

This, what in my mind, should be a simple task. Is one of the most painful projects I have undertaken. I was successful for three or four test runs with this same code. This is what bluemailer sent me:

Your BlueMail form has been completed, following are the results:
Field Value
Favorite_Track Dreamscapes
Music undefined
Comments This was a blast
Email allinnia@mac.com
Name Travis Coats

After being in a rut for the last 6 hours as to why it quit, can anyone politely show me an answer. One that is correct and true (not just one...both) PHP was even worse of a nightmare. What makes it worse is that I changed nothing and yet it still isn't working. I am not sure what happened, and Bluehost kindly imparted to me their motto of "we don't support scripting questions" although it is listed in their help ticket selections.:confused:

Any Flash gurus out there wanna help me out?

Travis Coats
05-26-2007, 05:47 AM
Caught this spelling error this morning, "....bluemail.com/bluemail" still isn't working though......

charlesgan
05-26-2007, 06:02 PM
'blast'.. that remind me of spam.
probably you are sending out too many email.
bluehost email, there is hourly limit of.....50.
http://www.bluehostreview.org/bluehost-smtp-daily-email-sending/

and second thing, for gateway/control-panel... it can block any IP that is suspecious of attack. so u will need to email support to explain what happening.

Travis Coats
05-28-2007, 04:38 AM
Thanks, I thought it was funny that it was doing it sometimes and not always, I could usually get like 4 tests off before it died. I have never got it to work when the .swf was put on the site though. I will definately call, thanks.:)

Travis Coats
09-11-2007, 09:40 PM
I forgot I posted in here. The problem with flash forms and bluemail is the crossdomain security feature that adobe places in it products. Bluehost, who would not respond, does not host a crossdomain.xml file in which allows information to be sent from flash to the CGI. I have moved away from this path and started on PHP. Does anyone have a working PHP mail script that they use with a FLASH form? Here is the one I have contrived and it is not sending anything in the message/content/body area of the mail. I do however receive the mail:

<?php

$to = 'travis@allinnia.com'.$eol;
$subject = 'Musical Critique'.$eol;
$msg .= "--".$htmlalt_mime_boundary.$eol;
$msg .= "Content-Type: text/plain; charset=iso-8859-1".$eol; $msg .= "Content-Transfer-Encoding: 8bit".$eol.$eol;
$msg .= strip_tags(str_replace("<br>", "\n", substr($body, (strpos($body, "<body>")+6)))).$eol.$eol;
$msg = $_POST["$Name\n\n"].$eol;
$msg = $_POST["$Email\n\n"].$eol;
$msg = $_POST["$Comments\n\n"].$eol;
$msg = $_POST["$Track\n\n"].$eol;
$headers = 'From: Allinnia.com' . "\r\n" .$eol;
$headers .= "X-Mailer: PHP v".phpversion().$eol.$eol;

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

echo "This PHP script has sent me a message with no content, but this message is a gaurantee that I am going to get something. Thanks.";

?>

This is quite annoying. I know many of the webmasters out there are taking full advantage of flash and php, and yet no one has any answers. I am following PHP code straight from PHP.net

ZaPHoN
06-23-2009, 12:54 AM
I'm having the same issues too with Flash form mail.

I can't seem to get it to work no matter what I do and it's not a matter of choice. I have to have Flash form mail with PHP.

This is the second php I am trying with the flash form. (me@mydomain.com is fictitional)

<?php

$subject = $_REQUEST["subject"];
$message = $_REQUEST["message"];
$sender = $_REQUEST["sender"];


$full_message = $_SERVER['REMOTE_ADDR'] . "\n\n" . $message;
$message= $full_message;

$message = stripslashes($message);
$subject = stripslashes($subject);
$sender = stripslashes($sender);

$subject = "Contact form ". $subject;

if(isset($message) and isset($subject) and isset($sender)){
mail("me@mydomain.com", $subject, $message, "From: $sender");
}
?>

felgall
06-23-2009, 02:30 AM
You could try the free version of my form2mail script at http://www.felgall.com/php2.htm

I haven't tried it with a flash form but if you place it on the same domain as the flash then you shouldn't have a cross domain issue.