我让它工作了一分钟,我不确定我做了什么来阻止它工作。它仍然将我带到提交时的另一个页面,但我的电子邮件绝对没有任何活动。
HTML
<form id="contact_form" action="sendemail.php" method="post">
<p><label>Name:<br />
<input type="text" name="name" class="textfield" value="" />
</label></p>
<p><label>Email: <br />
<input type="text" name="email" class="textfield" value="" />
</label></p>
<p><label>Phone Number: <br />
<input type="text" name="phone" class="textfield" value="" />
</label></p>
<p><label>Detail: <br />
<textarea name="detail" class="textarea" cols="45" rows="5"></textarea>
</label></p>
<p><input type="submit" name="submit" class="button" value="Submit" /></p>
</form>
PHP
<?php
$name = $_REQUEST['name'];
$email = $_REQUEST['email'];
$phone = $_REQUEST['phone'];
$detail = $_REQUEST['detail'];
$message = "Name: $name\nEmail: $email\nPhone Number: $phone\nDetail: $detail" ;
mail( "myemail@gmail.com", "You have recieved a message", "Information Requested:\n\n$message", "From: $email") ;
header( "location: http://mywebsite.com/thanks.html" );
?>