Jump to content

Issue With Form (from flash) - PHP


skar85

Recommended Posts

Hi all,

 

Ive got an issue with a php problem seem to be occuring…

Basically a flash form, but the php doesnt work on this particular server.

I’ve tested it on my hosting server and it executes the form fine. (which goes to show that the file is OK)....

 

Something is going on with their hosting server, and I’m not sure what it is…

 

What i then did was… instead of directing the php script to execute from their server, I’ve put it on my hosting server, and in flash loadvariable(link to php on myserver)....

 

Testing this on my server works, but testing on their hosting server doesn’t seem to even want to redirect itself to the outsource link…..?

Could below be the problem???....

 

phpinfo.php works both on my server and their server, but I’ve noticed that mine is php 5.2.4 and their server is 5.2.6…. is there a compatibility issue with the code on different versions?

 

<? if(!empty($HTTP_POST_VARS[‘sender_name’]) || !empty($HTTP_POST_VARS[‘sender_mail’]) || !empty($HTTP_POST_VARS[‘sender_subject’]) || !empty($HTTP_POST_VARS[‘sender_message’])) { } else { echo “output=error”; } ?>

 

$to = "EMAIL ADDY";

$subject .= "Website Email Form";

 

$body .= "Name: " . $HTTP_POST_VARS['sender_name'] . "\n" .

"Email: " . $HTTP_POST_VARS['sender_mail'] . "\n" .

"Subject: " . $HTTP_POST_VARS['sender_subject'] . "\n" .

"Message: " . $HTTP_POST_VARS['sender_message'] . "\n";

 

$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";

$header .= "Reply-To: " . $HTTP_POST_VARS['sender_name'] . " <" . $HTTP_POST_VARS['sender_mail'] . ">\n";

$header .= "X-Mailer: PHP/" . phpversion() . "\n";

$header .= "X-Priority: 1";

if(@mail($to, $subject, $body, $header))

{

    echo "output=sent";

} else {

    echo "output=error";

}

Link to comment
https://forums.phpfreaks.com/topic/132064-issue-with-form-from-flash-php/
Share on other sites

THanks everyonf for their input,

 

I’m still stuck on it… Maybe i’ve missed something that can’t see ?... Let me explain what I’ve done incase someone picks something up.

 

Form in flash with a send button, send button script is…

 

http://members.optusnet.com.au/alex.ka/1.txt

 

That should load contact.php which is as follows:

 

http://members.optusnet.com.au/alex.ka/2.txt

 

I put the swf and php on their server…....nothing

 

If i put them on mine…... it works.

 

So, i’ve also tried leaving the swf on their server and the php on mine, and then just changing :

 

loadVariables(“http://www.**.com/contact.php”,this,”POST”;

 

and it doesn’t allow to redirect.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.