테스트 사이트 - 개발 중인 베타 버전입니다

폼메일 급히 질문드립니다...ㅜㅜ

· 11년 전 · 2652 · 1
아래 파일 두개를 이용하여 폼메일을 사용하고 있습니다

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="
실패
";
}
?>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 1개

11년 전
$send = mail ($remail,$name,$tagsubject,$headers);
이걸 두개 넣으시면 됩니다.

$send = mail ($remail,$name,$tagsubject,$headers); //기존내용
$send = mail (작성자이메일,작성자이름,$tagsubject,$headers); //작성자용

게시글 목록

번호 제목
283964
283958
283956
283955
283951
283943
283942
283940
283939
283937
283932
283931
283929
283922
283912
283911
283901
283895
283885
283883