I have a form that has a few issues and looking for help. The form submits and pops up a message saying the form was submitted successfully, but the fields in the form still have data in them. I need some help with that function of the form. The other issue is with the form-select options not being sent along with the email. That part shows up blank. Any help is much appreciated.
HTML CODE:
[embed=425,349]
Request a Quote
<div class=“form-select” id=“service-select”">
Select Service
Real Estate
Inspections
Insurance
Video
<textarea name=“message” id="" cols=“30” rows=“5” name="message "placeholder=“Message” class=“form-control”>
Request Free Quote
[/embed]
PHP CODE:
[php]<?php
$service = $_POST[‘service’];
$name = $_POST[‘name’];
$phone = $_POST[‘phone’];
$email = $_POST[‘email’];
$message = $_POST[‘message’];
$formcontent=“From: $name \n service: $service \n phone: $phone \n Message: $message”;
$recipient = "[email protected]";
$subject = “my subject info”;
$mailheader = “From: $email \r\n”;
mail($recipient, $subject, $formcontent, $mailheader) or die(“Error!”);
echo "";
?>[/php]