아래 파일 두개를 이용하여 폼메일을 사용하고 있습니다
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="
실패
";
}
?>
댓글 1개
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기