Jump to content

How To Create A "your Message Has Been Received"


Guest otava

Recommended Posts

I have a script that sends aform to my mail and it works just fine. My concern is that the sender does not get any acknowledgment and I get repeated posts. I have tried quite a few solutions with echo or errormessage with negative results. I am looking for a solution that would show the acknowledgment on top of the form i.e in flashAny help is highly welkome.ThanksOtavaMy submit button script:on (release){ Name = userName.text; Email = userEmail.text; Phone = userPhone.text; Street = userStreet.text; City = userCity.text; Country = userCountry.text; Company = userCompany.text; Business = userBusiness.text; Position = userPosition.text; Project = userProject.text; Houses = userHouses.text; Land = userLand.text; Port = userPort.text; Message = userMessage.textArea.text; loadVariables("contact.php",'POST');}My PHP:<?phpfunction stripslashes_deep($value){$value = is_array($value) ?array_map('stripslashes_deep', $value) :stripslashes($value);return $value;}$_POST = stripslashes_deep($_POST);$sendTo = "info@mycompany.com";$subject = "Message from Contact Form";$name = $_POST['Name'];$email = $_POST['Email'];$phone = $_POST['Phone'];$street = $_POST['Street'];$city = $_POST['City'];$country = $_POST['Country'];$company = $_POST['Company'];$business = $_POST['Business'];$position = $_POST['Position'];$project = $_POST['Project'];$houses = $_POST['Houses'];$land = $_POST['Land'];$port = $_POST['Port'];$message = $_POST['Message'];$msg_body = "Name: $name\n";$msg_body .= "Email: $email\n";$msg_body .= "Phone: $phone\n";$msg_body .= "Street: $street\n";$msg_body .= "City: $city\n";$msg_body .= "Country: $country\n";$msg_body .= "Company: $company\n";$msg_body .= "Business: $business\n";$msg_body .= "Position: $position\n";$msg_body .= "Project: $project\n";$msg_body .= "Houses: $houses\n";$msg_body .= "Land: $land\n";$msg_body .= "Port: $port\n";$msg_body .= "Message: $message\n";$header_info = "From: ".$name." <".$email.">";mail($sendTo, $subject, $msg_body, $header_info);?>PSAny trials to deliver the message have been removed

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...