내 문의 양식이 작동하지 않는 이유를 파악하는 데 문제가 있습니다. 필자는 PHP에 비교적 익숙하지 않고 모든 것을 볼 수 있지만 모든 것이 링크되어 있지만 전자 메일을 보내려면 지정된 배달 주소로 아무 것도 보내지 않습니다. 어떤 도움을 주시면 감사하겠습니다 !! 고맙습니다!! 내 코드는 다음과 같습니다 :간단한 PHP 문의 양식 관련 문제
HTML
<table width="400" border="0" align="left" cellpadding="0" cellspacing="1">
<tr>
<td><form name="form1" method="post" action="mail.php">
<table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="16%">Subject</td>
<td width="2%">:</td>
<td width="82%"><input name="subject" type="text" id="subject" size="50"></td>
</tr>
<tr>
<td>Message</td>
<td>:</td>
<td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td>
</tr>
<tr>
<td>Name</td>
<td>:</td>
<td><input name="name" type="text" id="name" size="50"></td>
</tr>
<tr>
<td>Email</td>
<td>:</td>
<td><input name="customer_mail" type="text" id="customer_mail" size="50"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Submit"> <input type="reset" name="Submit2" value="Reset"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>
PHP
<?php
// Contact subject
$subject ="$subject";
// Details
$message="$detail";
// Mail of sender
$mail_from="$customer_mail";
// From
$header="from: $name <$mail_from>";
// Enter your email address
$to ='[email protected]';
$submit=mail($to,$subject,$message,$header);
// Check, if message sent to your email
// display message "We've recived your information"
if($submit){
echo "Thank you for contacting us at Allstar Therapies, Inc.<br /> We will be in touch shortly!";
}
else {
echo "ERROR";
}
?>
양식을 제출하면 무엇을 얻게됩니까? 빈 페이지가 있습니까? 텍스트가있는 흰색 페이지 (있는 경우 어떤 텍스트?) - 또는 무엇? 방화범이 끌려가 디버그 도움이 될 것입니다. - –
"ERROR"또는 "Thank you ..."부분에 입력 하시겠습니까? $ var를 ""에 묶을 필요는 없습니다! – Spoke44