cancel
Showing results for 
Search instead for 
Did you mean: 

PHP/Flash emailer nightmare

N/A

PHP/Flash emailer nightmare

Can you please help me to set up PHP with Flash?

I'm having difficulties setting up a simple email facility in Flash using PHP.
I've placed another PHP script into the webspace and it works fine when I test it. When I try to use Flash, although I believe I'm using the right path (the one going to http://cgi.username.force9.co.uk), the swf just hangs without retrieving any data like = mail have been sent successfully. I'm at my end without knowing what exactly is going wrong.

Here is the code for the script:

<?
$ToEmail = "my@company.com";

$ToName = "nobody";
$ToSubject = "Example Mail";

$EmailBody = "Sent By: $FirstName\nSenders Email: $Email\nSenders Company: $Company\n\nMessage Sent:\n$ToComments\n\nSender Heard About Site From: $HearAbout\n";

$EmailFooter="\nThis message was sent by: $FirstName from $REMOTE_ADDR If you feel that you recieved this e-mail by accident please contact us at www.somesite.com";

$Message = $EmailBody.$EmailFooter;

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


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

?>

Thanks in advace for any clues on this!
4 REPLIES
N/A

PHP/Flash emailer nightmare

I believe that http://cgi.username.force9.co.uk/ should be
http://cgi.username.f9.com

I know on another thread in this forum I quoted the .co.uk version but I have since looked at the settings for my cgi stuff on Plusnet and I think I was wrong.

Hope this helps you.
N/A

PHP/Flash emailer nightmare

thanks for your reply. I've changed the settings to that new address but still flash and PHP don't communicate.

Do you have anymore suggestions?
N/A

PHP/Flash emailer nightmare

Sorry I've been a long time getting back to you following your reply.

I'm not a great expert on php coding but looking at the one you have posted and comparing the mail bit to one that I use on my guestbook it looks Ok.

Just a thought though. Where is the program that is trying to call the php located?
If this is on the htdocs server I dont think it will work properly due to the cgi being a totally seperate server.
I found I had to put the program that calls my guest book also on the cgi server to make it work.

If this "Flash" program is already on the cgi server then I've run out of ideas Cry
N/A

PHP/Flash emailer nightmare

hi

ive also been trying to get flash and php to communicate to makea flash message board, but unlike you i cannnot get my flash to work with the php script! Just so you know you are not alone :roll:

Also it would be a lot easier to put the html and cgi servers onto one server, would it not? because you cannot run any swf or html files off the cgi server unless you get them written into the php, which i dont know how to do Sad

Anyone else got an idea?!

Andy Burton