...

View Full Version : Script Proccessing of a flash form!



Bazrazmataz
05-21-2004, 07:21 PM
Hi guys

My flash form has 3 input text fields and 1 dynamic text field. See www.razmataz-designs.co.uk click on flash site. I followed a tutorial and everything seemed ok until i posted it on the net. I keep getting a blank email and for every one press on the send button im getting tens of blank emails. Also the script is not sending the confirmation message back to the dynamic text field in the form. Ive attached a stand alone form and the script im using can anyone help me identify the problem?
link to my fla file
http://www.razmataz-designs.co.uk/form.fla

The script i used

<?
$ToEmail = "info@razmataz-designs.co.uk";

$ToName = "Barry";
$ToSubject = "Message From Razmataz Designs Flashsite";

$EmailBody = "Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n$ToComments\n";

$Message = $EmailBody;

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$FirstName." <".$Email.">");


Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";
?>


Cheers

cpradio
05-21-2004, 08:10 PM
Unfortunately, I cannot open the FLA on this PC as I do not have flash installed. However, I may know the answer, but it depends if you are sending the results by GET or POST.

If by GET change your PHP code to this:

<?php
$ToEmail = "info@razmataz-designs.co.uk";

$ToName = "Barry";
$ToSubject = "Message From Razmataz Designs Flashsite";

$EmailBody = "Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n{$_GET['ToComments']}\n";

$Message = "{$_GET['EmailBody']}";

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: "{$_GET['FirstName']}" <"{$_GET['Email']}">");


Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";
?>


If by POSTchange your PHP code to this:

<?php
$ToEmail = "info@razmataz-designs.co.uk";

$ToName = "Barry";
$ToSubject = "Message From Razmataz Designs Flashsite";

$EmailBody = "Sent By: $FirstName\nSenders Email: $Email\n\nMessage Sent:\n{$_POST['ToComments']}\n";

$Message = "{$_POST['EmailBody']}";

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: "{$_POST['FirstName']}" <"{$_POST['Email']}">");


Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";
?>


My guess is your hosting server has register globals turned off. Now, do not quote me on that, as it is only a guess, but it may be the reason.

Bazrazmataz
05-22-2004, 09:32 AM
Pardon my ignorance but what is the difference between get or post ?

Bazrazmataz
05-22-2004, 10:00 AM
I tried both scripts and both did not work. I revice no email at all now and still get no confimation to the movie ! im getting really frustriaghted niow!

Bazrazmataz
05-22-2004, 11:25 AM
This is what ive tried next without any success!!

<?php
$sendTo = "info@razmataz-designs.co.uk";
$subject = "Message From Razmataz Designs Flashsite";

$headers="From:". $_POST["FirstName"];
$headers .= "<" . $_POST["email"] .">\r\n";
$message = $_POST["ToComments"];

mail($sendTo, $subject, $message, $headers);
Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";

?>

Well i just tested this one and got different results again. Again confirmation was not sent back to the movie but a separate window popped up saying :_root.Mail.EmailStatus=Complete - Your mail has been sent

Now i recived an email this time but again it was blank and my email account had this error message :

Warning: Invalid argument supplied for foreach() in /var/www/squirrelmail/src/read_body.php on line 620

So now im totally lost!!

Just altered script to:

<?php
$sendTo = "info@razmataz-designs.co.uk";
$subject = "Message From Razmataz Designs Flashsite";

$headers= $_POST["FirstName"];
$headers .= $_POST["email"];
$message = $_POST["ToComments"];

mail($sendTo, $subject, $message, $headers);
Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";

?>

No error message in my email account now but still getting a blank message. And dont understand why the poppup message is appearing in a window rather than in my dynamic text field!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum