graphixman Posted October 27, 2009 Share Posted October 27, 2009 Ok, Ill be the first to say I am a complete noob at PHP. I am trying to do something very simple: using input text fields in a flash object (.swf) upload the variables from that input text into a simple php script to email the variables for the input text fields to a email address. I cant get it to work and I cant find any errors in the code, could someone look over my code and see if they see what I'm missing? This is the script to upload the variables out of the input text fields: on (release) { userName.text = ""; userEmail.text = ""; userSubject.text = ""; userDepartment.text = ""; userMessage.text = ""; } and this is the PHP code to receive the variables and send them: <?php $name = $_POST["Name"]; $email = $_POST["Email"]; $Subject = $_POST["Subject"]; $department = $_POST["Department"]; $message = $_POST["Message"]; $message = stripslashes($message); $sendTo = "[email protected]"; $subject = "Message from Contact Form"; $msg_body = "Name: $name\n"; $msg_body .= "E-Mail: $email\n"; $msg_body .= "Subject: $subject\n"; $msg_body .= "Department: $department\n"; $msg_body .= "Message: $message\n"; $header_info = "From: ".$name." <".$email.">"; mail($sendTo, $subject, $msg_body, $header_info); ?> Can anybody help me understand why it doesnt work? all help greatly appreciated! Link to comment https://forums.phpfreaks.com/topic/179129-help-transfering-variables-and-emailing-via-php-mail-function-please/ Share on other sites More sharing options...
graphixman Posted October 27, 2009 Author Share Posted October 27, 2009 Sorry, the first code is incorrect, this is the correct code: on (release) { var Name = userName.text; var Email = userEmail.text; var Subject = userSubject.text; var Department = userDepartment.text; var Message = userMessage.text; loadVariables("contact.php",'POST'); } Link to comment https://forums.phpfreaks.com/topic/179129-help-transfering-variables-and-emailing-via-php-mail-function-please/#findComment-945087 Share on other sites More sharing options...
graphixman Posted October 27, 2009 Author Share Posted October 27, 2009 is there noone out there who can help me? Link to comment https://forums.phpfreaks.com/topic/179129-help-transfering-variables-and-emailing-via-php-mail-function-please/#findComment-945344 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.