Hi,
I’m trying to work out how to send data from a contact form to email with no knowledge of PHP.
I’ve copy/pasted some code and am going OK so far. I’m receiving the emails with the email address and message, but I don’t receive the name? I’ve tried a few things but cant’ work out where to put what…
Below is the form code:
<form method="post" action="sendmail.php">
<dl class="contained tabs">
<dd class="active"><a href="#contactForm">Contact Us</a></dd>
</dl>
<ul class="tabs-content contained">
<li id="contactFormTab" class="active">
<div class="row collapse">
<div class="two columns"><label class="inline">Your Name</label></div>
<div class="ten columns"><input type="text" placeholder="Your Name" name="name" />
</div>
<div class="row collapse">
<div class="two columns"><label class="inline">Your Email</label></div>
<div class="ten columns"><input type="text" placeholder="Your Email" name="email" />
</div>
<label>Your Inquiry</label>
<textarea rows="4" name="message"></textarea>
<button type="submit" class="radius button">Submit</button>
</li>
</ul>
</form>
And here is the PHP:
<?php
$name = $_REQUEST['name'] ;
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
mail( "email address", "Feedback Form Results",
$message, "From: $email" );
header( "Location: thankyou page" );
?>
Do I need to add something in the 7th line of the PHP code?