Page 1 of 1

PHP Form Problem

Posted: Thu Jul 24, 2003 1:04 pm
by SlaterCM
I have a flash form using PHP that sends the form info to an email address and sends the user that entered the info a confirmation.

The Emails are being sent but the confirmation answer is not being sent back to the form. So the form sits there waiting for the confirmation & never finishes.

This Form works on one server using UNIX but not on another server using windows.

Any help on this would be greatly appreciated.

If you need any more info or would like to see examples of this form workin on one server & but not another please email me at
Jeff@SlaterCM.com

Thank you

Re: PHP Form Problem

Posted: Mon Jul 28, 2003 12:52 pm
by tylerdurden
SlaterCM wrote: The Emails are being sent but the confirmation answer is not being sent back to the form. So the form sits there waiting for the confirmation & never finishes.
What do you mean by "the confirmation answer is not being sent back to the form"? I dont get it. Please post your PHP-Script.

Posted: Mon Jul 28, 2003 1:13 pm
by m3rajk
i think i know what you mean, as cryptic as your post was... i think i know becasue if i'm right i was having the same issue... correct me if i'm wrong, but your confirmation code is sent, but it's not accepting it?

if that's the case, i can help you, but you need to show me some code. ineed to see how you make the confirmation code.
i also need to see how you store it across pages

Posted: Mon Jul 28, 2003 1:16 pm
by SlaterCM
$adminaddress = "paddleboards@aol.com";
$siteaddress ="http://www.paddleboards.com";
$sitename = "Paddleboards.com";


// Gets the date and time from your server
$date = date("m/d/Y H:i:s");

// Gets the IP Address
if ($REMOTE_ADDR == "") $ip = "no ip";
else $ip = getHostByAddr($REMOTE_ADDR);

// Gets the POST Headers - the Flash variables
$action = $HTTP_POST_VARS['action'] ;
$email = $HTTP_POST_VARS['email'] ;
$fname = $HTTP_POST_VARS['fname'] ;
$lname = $HTTP_POST_VARS['lname'] ;
$cname = $HTTP_POST_VARS['cname'] ;
$telno = $HTTP_POST_VARS['telno'] ;
$address = $HTTP_POST_VARS['address'] ;
$comments = $HTTP_POST_VARS['comments'] ;

//Process the form data!
// and send the information collected in the Flash form to Your nominated email address

if ($action == "send") {
//
mail ("$adminaddress","Info Request",
"A visitor at $sitename has left the following information\n
First Name: $fname
Last Name: $lname
Email: $email
Company: $cname
Telephone: $telno\n
The visitors Address:
------------------------------
$address

The visitor commented:
------------------------------
$comments

Logged Info :
------------------------------
Date/Time: $date","FROM:$adminaddress" ) ;

//This sends a confirmation to your visitor
mail ("$email","Thank You for visiting $sitename",
"Hi $fname,\n
Thank you for your interest in $sitename!\n
Cheers,
$sitename
$siteaddress","FROM:$adminaddress") ;

//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thank you. You will receive a confirmation email shortly.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo $send_answer;
} //


?>
//Confirmation is sent back to the Flash form that the process is complete
$sendresult = "Thank you. You will receive a confirmation email shortly.";
$send_answer = "answer=";
$send_answer .= rawurlencode($sendresult);
echo $send_answer;


This is where my problem is. the answer is not being sent back to the form letting it know that the emails have been sent succesfully.

Check out this website to see the form not working http://www.paddleboards.com

Posted: Mon Jul 28, 2003 1:23 pm
by m3rajk
ok. not what i was thinking. sorry. i wish i could help you but i don't know flash

Posted: Mon Jul 28, 2003 1:25 pm
by SlaterCM
Thanks anyway. I appreciate it!

Posted: Mon Jul 28, 2003 1:57 pm
by tylerdurden
Hmm. When you use

Code: Select all

loadVariables ("email.php", "", "POST");
play();
That should return the "answer" variable to the flash movie ready to be interpreted. Is this the code you are using inside the form.swf?

Posted: Mon Jul 28, 2003 2:05 pm
by SlaterCM
yes.

& did you see that this form works fine on one server but not another?

Doesnt work on this site: http://www.paddleboards.com

Works here: http://www.slatercm.com/mo/main.html

Posted: Mon Jul 28, 2003 4:34 pm
by tylerdurden
Hmm, have have you tried feeding the POST data to your mail script via a regular HTML-Form to check what exact output is generated by the script? Just to check if there are any errors.