폼메일 급히 질문드립니다...ㅜㅜ 정보
폼메일 급히 질문드립니다...ㅜㅜ본문
아래 파일 두개를 이용하여 폼메일을 사용하고 있습니다
index 페이지에서 내용을 작성하고 이미지 버튼을 누르면
제 메일로 작성한 내용이 오는 기능인데
작성한 내용을 제 메일로 발송하면서 작성자가 입력한 메일에도 같이 발송하고 싶습니다
어떻게 구현해야하는지 도움을 주시면 정말 감사하겠습니다..ㅠㅠ
index.php
---------------------------------------------------
<script>
function orderSubmit()
{
with(document.july_check)
{
if( name.value=='' )
{
alert('이름을 입력하세요');
name.focus();
return false;
}
if( phone.value=='' )
{
alert('연락처를 입력하세요');
phone.focus();
return false;
}
if( email.value=='' )
{
alert('이메일을 입력하세요');
email.focus();
return false;
}
if( address.value=='' )
{
alert('주소를 입력하세요');
address.focus();
return false;
}
}
}
</script>
<form method="post" action="A.php" name="july_check">
<input name="remail" type="hidden" value="제메일주소" />
<input name="name" type="text" class="input_text_write" style="width:50px" />
<input name="email" type="text" class="input_text_write" style="width:180px" />
<input name="address" type="text" class="input_text_write" style="width:250px" />
<input type="image" src="img/submit.jpg" border="0" onclick='return orderSubmit();' onfocus="blur()"/>
A.php
---------------------------------------------------------
<?php
function write($str) {
echo $str;
}
$tagsubject = "
$address
";
$headers = "From: $name<$email>\r\n";
$headers.= "Content-Type : text/html; charset=utf-8";
$send = mail ($remail,$name,$tagsubject,$headers);
if($send){
$thejuly="내용1
";
}
else{
$thejuly="
실패
";
}
?>
index 페이지에서 내용을 작성하고 이미지 버튼을 누르면
제 메일로 작성한 내용이 오는 기능인데
작성한 내용을 제 메일로 발송하면서 작성자가 입력한 메일에도 같이 발송하고 싶습니다
어떻게 구현해야하는지 도움을 주시면 정말 감사하겠습니다..ㅠㅠ
index.php
---------------------------------------------------
<script>
function orderSubmit()
{
with(document.july_check)
{
if( name.value=='' )
{
alert('이름을 입력하세요');
name.focus();
return false;
}
if( phone.value=='' )
{
alert('연락처를 입력하세요');
phone.focus();
return false;
}
if( email.value=='' )
{
alert('이메일을 입력하세요');
email.focus();
return false;
}
if( address.value=='' )
{
alert('주소를 입력하세요');
address.focus();
return false;
}
}
}
</script>
<form method="post" action="A.php" name="july_check">
<input name="remail" type="hidden" value="제메일주소" />
<input name="name" type="text" class="input_text_write" style="width:50px" />
<input name="email" type="text" class="input_text_write" style="width:180px" />
<input name="address" type="text" class="input_text_write" style="width:250px" />
<input type="image" src="img/submit.jpg" border="0" onclick='return orderSubmit();' onfocus="blur()"/>
A.php
---------------------------------------------------------
<?php
function write($str) {
echo $str;
}
$tagsubject = "
$address
";
$headers = "From: $name<$email>\r\n";
$headers.= "Content-Type : text/html; charset=utf-8";
$send = mail ($remail,$name,$tagsubject,$headers);
if($send){
$thejuly="내용1
";
}
else{
$thejuly="
실패
";
}
?>
Fatal error: Uncaught TypeError: mysqli_fetch_assoc(): Argument #1 ($result) must be of type mysqli_result, null given in /home/kagla/new-sir/old/lib/common.lib.php:2339 Stack trace: #0 /home/kagla/new-sir/old/lib/common.lib.php(2339): mysqli_fetch_assoc() #1 /home/kagla/new-sir/old/skin/board/v16/view.skin.php(795): sql_fetch_array() #2 /home/kagla/new-sir/old/bbs/view.php(403): include_once('...') #3 /home/kagla/new-sir/old/bbs/board.php(300): include_once('...') #4 {main} thrown in /home/kagla/new-sir/old/lib/common.lib.php on line 2339