Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-21-2004, 07:21 PM   PM User | #1
Bazrazmataz
New Coder

 
Join Date: Apr 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Bazrazmataz is an unknown quantity at this point
Script Proccessing of a flash form!

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

Last edited by Bazrazmataz; 05-21-2004 at 07:48 PM..
Bazrazmataz is offline   Reply With Quote
Old 05-21-2004, 08:10 PM   PM User | #2
cpradio
New Coder

 
Join Date: May 2003
Posts: 71
Thanks: 0
Thanked 0 Times in 0 Posts
cpradio is an unknown quantity at this point
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 Code:
<?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 Code:
<?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.
__________________
cpCommerce - Finally a template based open-source e-commerce solution
cpradio is offline   Reply With Quote
Old 05-22-2004, 09:32 AM   PM User | #3
Bazrazmataz
New Coder

 
Join Date: Apr 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Bazrazmataz is an unknown quantity at this point
Pardon my ignorance but what is the difference between get or post ?
Bazrazmataz is offline   Reply With Quote
Old 05-22-2004, 10:00 AM   PM User | #4
Bazrazmataz
New Coder

 
Join Date: Apr 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Bazrazmataz is an unknown quantity at this point
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 is offline   Reply With Quote
Old 05-22-2004, 11:25 AM   PM User | #5
Bazrazmataz
New Coder

 
Join Date: Apr 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Bazrazmataz is an unknown quantity at this point
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!
Bazrazmataz is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:21 AM.


Advertisement
Log in to turn off these ads.