Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

getting PHP to communicate with FLASH

New Here ,
Feb 19, 2007 Feb 19, 2007
Im having some issues getting my flash contact form to communicate with my form.PHP I have been scouring tutorials but im just not getting what exactly goes into the PHP file. My variables are different from the tutorials I have seen. This is what I have

I guess my main question is how do I set up the PHP file so that it can work with my flash files?
TOPICS
ActionScript
78.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2007 Feb 22, 2007
if you're not getting the email from my test link it's because the email address is incorrect (which i know you've checked) OR my server has restrictions on using their server sending emails to non-authorized recipients (which is highly likely).

but if you're having trouble using your server check your servers email policies. that email address may not be an authorized recipient of emails sent from your server.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 22, 2007 Feb 22, 2007
correction it will go to the frame label now that I have the PHP in the same location as the SWF. but still no email I will check with the server to make sure that email will work
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2007 Feb 22, 2007
unzip the files i sent. upload the html file and php file using ascii protocol. upload to the same directory the swf file using binary protocol. retest.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 22, 2007 Feb 22, 2007
Ok last question, and then I will shut up because I am sure everybody is annoyed with this thread. I just dont understand why it can work one place and not the other. I changed the email address, thinking maybe that had something to do with it. Im not sure if my hosting company supports sending email to an external address, so I invented a new email that has the same domain name and updated that in both my PHP and swf files, and still nothing, but I can tell it is communicating because there is a small delay when i hit the send button which is why I think it is receiving the data in the PHP file but it is not sending. If you could check the PHP file one more time and see if you can pick out anything that looks odd, I would appreciate it.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Feb 22, 2007 Feb 22, 2007
LATEST
I see one thing that stands out. It's the $phone variable.

Here is the syntax (from php.net) for the mail function

bool mail ( string $to, string $subject, string $message [, string $additional_headers [, string $additional_parameters]] )

According to your php file, the following information is being sent.....

$to is right
$subject is right
$message is right
$phone is wrong (this should be sent inside the body of your message if you want their phone number)... according to the mail functions parameters, this would be header information and since this is going to be ###-###-#### and not of the form MIME blah blah blah, the server receiving the e-mail is going to reject it. change your mail line to this....

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

also change the variable call to message to this....

$message = $_POST['visitor_comments']." ".$_POST['visitor_phone'];

and get rid of the $phone = $_POST['visitor_phone']; line as it won't be necessary.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines