php - form will not submit and I have tried all I know

878

My form will not submit. Please help. I have two additional forms that work fine but this one is giving me a lot of trouble. I am not getting any error messages at all. I am fairly new in the php world. It seems simple until I got to this!

Signed A Very frustrated PHP beginner

PHP code:

<?php 

$fname = $_POST['fname'];
$lname = $_POST['lname'];
$email = $_POST['email'];
$emailblast =$_POST['emailblast'];
$phone= $_POST['phonenumber'];
$date= $_POST['visitdate'];
$Salvation = $_POST['Salvation'];
$Baptism = $_POST['Baptism'];
$LMBaptism= $_POST['LMBaptism'];
$Church= $_POST['Church'];
$Hear= $_POST['Howyouhear'];

$fullname = $fname . ' ' . $lname ;

$formcontent="Name: $fullname Phone Number: $phone \n Email: 
$email \n Date: $date \n Seeking Sal: $Salvation \n Baptized: $Baptism \n 
Learn More: $LMBaptism \n Church Home: $Church \n How did you hear about us: 
$Hear \n" ;
$recipient = "[email protected]";
$subject = "Visitor Online Form";

$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");

echo "Thank You!";

?>

People are also looking for solutions to the problem: php - In Laravel, how do I retrieve a random user_id from the Users table for Model Factory seeding data generation?

Source

Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.