nightkarnation Posted February 24, 2009 Share Posted February 24, 2009 Hello...Here's the comple PHP code: and commented the line that has a problem Everything works fine but when i try to email with mail() i get the following error on FLASH: Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs. if ($action == "uploadContact") { $name=$_POST['txtName']; $email=$_POST['email']; $message=$_POST['txtMessage']; $date = date("F j, Y"); $time = time(); $to = "[email protected]"; $subject = "Contact from my site"; $headers = "From: " . $email; mail($to,$subject,$message,$headers); //THIS LINE IF I REMOVE IT... //EVERYTHING WORKS FINE AND NO ERROR IS DISPLAYED ON FLASH //ONLY OBVIOUSLY THAT THE EMAIL IS NOT SENT $result = mysql_query("INSERT INTO `contact` (name, email, message, date, time) VALUES ('$name', '$email', '$message', '$date', '$time')"); if($result) { $imdoneUpdate = true; echo "imdoneUpdate=".$imdoneUpdate; } else { $imdoneUpdate = false; echo "imdoneUpdate=".$imdoneUpdate; } } Any ideas? Link to comment https://forums.phpfreaks.com/topic/146724-flash-with-php-email-form-problem/ Share on other sites More sharing options...
jj20051 Posted February 24, 2009 Share Posted February 24, 2009 Try This: $name = $_POST['txtName']; $email = $_POST['email']; $body = $_POST['txtMessage']; $date = date("F j, Y"); $time = time(); $to = "[email protected]"; $subject = "Contact From Your Site!"; $headers = 'From: ' . $email; if (mail($to, $subject, $body, $headers)) { echo("<p>Message successfully sent!</p>"); } else { echo("<p>Message delivery failed...</p>"); } Link to comment https://forums.phpfreaks.com/topic/146724-flash-with-php-email-form-problem/#findComment-770354 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.