묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
페이지에 폼이 있어서 submit버튼을 누르면 폼이 이메일로 오게 하려구 하는데요..
스크립트는 어디서 카피해 왔거덩요. 근데 submit을 누르면 이메일이 어디로 가는지 모르겠어요..어떻게 지정을 하는거죠? 아시는분 좀 도와주세요...
감사합니다
acefull@yahoo.com
-------------------------------------
<html>
<head>
<title>신청</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="../style_old.css" type="text/css">
</head>
<script language="javascript">
<!--
function send_mail()
{
var frm = document.request_tape;
if (frm.name.value == ""){
alert("받는 사람의 이름을 적어주세요");
return;
}
if (frm.addr.value == ""){
alert("받는 사람의 주소를 적어주세요.");
return;
}
if (frm.email.value == ""){
alert("메일주소를 적어주세요.");
return;
}
frm.action = "tape_writeok.html"
frm.submit()
}
//-->
</script>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<form name="request_tape">
<table width="628" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td><img src="img/title_tape.gif" width="580" height="30"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="580" border="0" cellspacing="1" cellpadding="0" bgcolor="#E8E8E8">
<tr>
<td bgcolor="#FFFFFF">
<table width="560" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" align="center"><img src="img/img_tape01.gif" width="60" height="55"></td>
<td width="460" height="90" class="td17">1111</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="30" valign="top"><img src="img/title_tape_2.gif" width="200" height="20"></td>
</tr>
<tr>
<td class="td17"><p><font color="#0DA9BF">ddjlskdfjlaskfjas;kfasfjas;fjas;fjas;jflasf</font></p>
<p><font color="#0DA9BF">asdfkas;fj;asfj;asjf</font></p>
<p><font color="#0DA9BF">asdfjasl;dfkjas;</font></p></td>
</tr>
<tr>
<td height="5">
</td>
</tr>
<tr>
<td height="30" align="center"><table width="480" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="top"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="5">
</td>
</tr>
<tr>
<td align="center">
<table width="530" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6"><img src="img/img_tape02.gif" width="530" height="75"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"> </td>
<td width="10"></td>
<td width="380"> </td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
받는이</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="name" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
받는주소</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="addr" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
전화번호</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="tel" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
E-mail</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="email" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
전달사항</b></td>
<td width="10"></td>
<td width="380">
<textarea name="content" class="input" cols="52" rows="5"></textarea>
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"> </td>
<td width="10"></td>
<td width="380" align="right" height="60">
<table width="128" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="javascript:send_mail()"><img src="img/but_send.gif" width="80" height="22" border="0"></a></td>
</tr>
</table>
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4" height="4"></td>
<td bgcolor="#E8E8E8" height="4" width="106"></td>
<td bgcolor="#E8E8E8" height="4" width="10"></td>
<td bgcolor="#E8E8E8" height="4" width="380"></td>
<td bgcolor="#E8E8E8" width="4" height="4"></td>
<td width="26" height="4"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="24"> </td>
</tr>
<tr>
<td height="1" bgcolor="#D9D9D9"></td>
</tr>
<tr>
<td height="30" align="right"><a href="#"><img src="img/top.gif" width="34" height="12" border="0"></a></td>
</tr>
</table>
</td>
<td bgcolor="#E8E8E8" width="1"></td>
</tr>
</table>
</body>
</html>
---------------------
send_mail 관련 질문입니다.
2005.12.01 05:06
페이지에 폼이 있어서 submit버튼을 누르면 폼이 이메일로 오게 하려구 하는데요..
스크립트는 어디서 카피해 왔거덩요. 근데 submit을 누르면 이메일이 어디로 가는지 모르겠어요..어떻게 지정을 하는거죠? 아시는분 좀 도와주세요...
감사합니다
acefull@yahoo.com
-------------------------------------
<html>
<head>
<title>신청</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="../style_old.css" type="text/css">
</head>
<script language="javascript">
<!--
function send_mail()
{
var frm = document.request_tape;
if (frm.name.value == ""){
alert("받는 사람의 이름을 적어주세요");
return;
}
if (frm.addr.value == ""){
alert("받는 사람의 주소를 적어주세요.");
return;
}
if (frm.email.value == ""){
alert("메일주소를 적어주세요.");
return;
}
frm.action = "tape_writeok.html"
frm.submit()
}
//-->
</script>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0">
<form name="request_tape">
<table width="628" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center">
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
<tr>
<td><img src="img/title_tape.gif" width="580" height="30"></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td>
<table width="580" border="0" cellspacing="1" cellpadding="0" bgcolor="#E8E8E8">
<tr>
<td bgcolor="#FFFFFF">
<table width="560" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100" align="center"><img src="img/img_tape01.gif" width="60" height="55"></td>
<td width="460" height="90" class="td17">1111</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td height="30" valign="top"><img src="img/title_tape_2.gif" width="200" height="20"></td>
</tr>
<tr>
<td class="td17"><p><font color="#0DA9BF">ddjlskdfjlaskfjas;kfasfjas;fjas;fjas;jflasf</font></p>
<p><font color="#0DA9BF">asdfkas;fj;asfj;asjf</font></p>
<p><font color="#0DA9BF">asdfjasl;dfkjas;</font></p></td>
</tr>
<tr>
<td height="5">
</td>
</tr>
<tr>
<td height="30" align="center"><table width="480" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="right" valign="top"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="5">
</td>
</tr>
<tr>
<td align="center">
<table width="530" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="6"><img src="img/img_tape02.gif" width="530" height="75"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"> </td>
<td width="10"></td>
<td width="380"> </td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
받는이</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="name" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
받는주소</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="addr" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
전화번호</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="tel" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
E-mail</b></td>
<td width="10"></td>
<td width="380">
<input type="text" name="email" class="input" size="46">
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"><b><font color="#9966CC">+</font>
전달사항</b></td>
<td width="10"></td>
<td width="380">
<textarea name="content" class="input" cols="52" rows="5"></textarea>
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="106" align="right"> </td>
<td width="10"></td>
<td width="380" align="right" height="60">
<table width="128" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><a href="javascript:send_mail()"><img src="img/but_send.gif" width="80" height="22" border="0"></a></td>
</tr>
</table>
</td>
<td bgcolor="#E8E8E8" width="4"></td>
<td width="26"></td>
</tr>
<tr>
<td bgcolor="#E8E8E8" width="4" height="4"></td>
<td bgcolor="#E8E8E8" height="4" width="106"></td>
<td bgcolor="#E8E8E8" height="4" width="10"></td>
<td bgcolor="#E8E8E8" height="4" width="380"></td>
<td bgcolor="#E8E8E8" width="4" height="4"></td>
<td width="26" height="4"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="24"> </td>
</tr>
<tr>
<td height="1" bgcolor="#D9D9D9"></td>
</tr>
<tr>
<td height="30" align="right"><a href="#"><img src="img/top.gif" width="34" height="12" border="0"></a></td>
</tr>
</table>
</td>
<td bgcolor="#E8E8E8" width="1"></td>
</tr>
</table>
</body>
</html>
---------------------
<?
$mail = "보내는 사람 메일 주소";
$to_mail = "받는 사람 메일 주소";
$subject= "메일 제목";
$content = "메일 내용";
$from ="From:$mail\nReply-to:$mail\nContent-Type:text/html; charset=\"euc-kr\"";
/* mail(받는 사람, 제목, 내용, 메일헤더); */
mail($to_mail, $subject, $content, $from);
?>
이렇게 해보심이