<?php
if(isset($_POST['email'])) {
$user_email = $_POST['email']; // this is just grabbed form the user email field
$email_to = "btndeals@btn.deals"; // where is the email going?
$fullname = $_POST['fname']; // get the full name from hte $_POST data
$subject = $_POST ['subject']; // what is the email subject?
$message = $_POST['message']; // get the message from the $_POST data
// ...geting data
if(mail($email_to, $fname, $subject, $message, "From:" . $email)) {
//the email got sent!!!
//you can echo html out here :)
echo "<strong>Sucessfully sent</strong>";
} else {
//email didn't work!
//you can out html here :)
echo "Error";
}
}
?>
when running code on the server it keeps coming up with error could someone please help me, im new to php so im still learing how to use it.