Jump to content

Contact form block


Medavidcook

Recommended Posts

Hey

 

Need help i am having a mental block

 

when I fill in the form and click send it sends the form but looks like this

Name: , 
Email: , 
Subject: , 
Message:

the form data is 

<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];

$formContent = "From: $name, \n Email: $email, \n Subject: $subject, \n Message: $message";
$recipient = "[email protected]";
$subject = "Website Request";
$mailheader = "Website \r\n";
mail($recipient, $subject, $formContent, $mailheader);
echo "Your message was sent" . " - " . "<a href='index.html' style='text-decoration: none; color: #d03837;'>Return Home</a>";
?>

Anyone with any ideas

Link to comment
https://forums.phpfreaks.com/topic/289215-contact-form-block/
Share on other sites

yeh realised that i took the post out of method on the form

 

Since it sounds like you figured out the issue, I have marked the thread as solved. If you need further assistance, please mark the thread as unsolved...or you can start a new thread if the problem is unrelated to the topic.  :happy-04:

Link to comment
https://forums.phpfreaks.com/topic/289215-contact-form-block/#findComment-1482935
Share on other sites

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.