본인의 웹 사이트에이 문의 양식이 있지만 양식 필드가 완성되었는지 확인할 수 없습니다. 다음은 문의 양식 - 사용자가 모든 입력란을 완료했는지 확인하십시오.
<form id="cform" name="cform" method="post" action="<?php bloginfo('template_directory'); ?>/cform.php">
<div id="nande">
<p><input type="text" id="name" name ="name"; onfocus="if(this.value=='Your Name is')this.value='';" onblur="if(this.value=='')this.value='Your Name is';" alt="Your Name" value="Your Name is"/></p>
<p> <input type="text" id="e-mail" name="mail" onfocus="if(this.value=='Your Email is')this.value='';" onblur="if(this.value=='')this.value='Your Email is';" alt="Your Email" value="Your Email is"/></p>
</div>
<div class="clear"></div>
<p><textarea name="message" rows="4" id="comments" tabindex="4" title="comments" onfocus="if(this.value=='Your Message is')this.value='';" onblur="if(this.value=='')this.value='Your Message is';"">Your Message is</textarea></p>
<div class="clear"></div>
<p><input name="submit" type="submit" value="SEND" id="submit"/></p>
</form>
양식
<?php
if(isset($_POST['submit'])) {
$to = '[email protected]' ; //put your email address on which you want to receive the information
$subject = 'designdone project email'; //set the subject of email.
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$message = "<table><tr><td>Your Name</td><td>".$_POST['name']."</td></tr>
<tr><td>E-Mail</td><td>".$_POST['email']."</td></tr>
<tr><td>Message</td><td>".$_POST['message']."</td>
</tr></table>" ;
mail($to, $subject, $message, $headers);
header('Location: http://designdone.com') ;
}
?>
에 대한 PHP가 어떻게 사용자가 양식을 완료되었는지 확인할 수 및 빈 양식을 보내지 않습니다입니까?
도움 주셔서 감사합니다.
이 양식을 사용하여 문제를 해결했습니다. http://www.freecontactform.com/email_form.php @editor에서 제안한 것과 같은 개념입니다. – designdone