我在这里建立了一个表单:http://22twenty.com/wordpress/contact/
它从标准格式获得传统代码
<form id="contact" method="post" action="<?php bloginfo('template_directory'); ?> contact-send.php" class="validateform">
<div id="errormessage"></div>
<div id="sendmessage">
<p>Your message has been sent. Thank you!</p>
</div>
<div class="formfield">
<input name="name" type="text"placeholder="Name:" class="text" required/>
</div>
<div class="formfield">
<input name="email" type="email" placeholder="Email:" class="text" required/>
</div>
<div class="formfield">
<input name="subject" type="text" placeholder="Subject:" class="text" required/>
</div>
<div class="formfield">
<textarea name="message" class="text textarea" placeholder="Enter Your Message Here:" required></textarea>
</div>
<div class="formfield">
<input type="submit" id="send" value="Post message" class="btn" />
</div>
</form>
<?php $name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$formcontent="From: $name \n Message: $message";
$recipient = "get_option('admin_email')";
$subject = $_POST['subject'];
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
?>
我想知道两件事情是添加表单的最佳方式,我可以在这种意义上使用get_opition(&#39; admin_email&#39;)吗?
由于
丹佛