묻고답하기



소스는

http://www.nzeo.com/bbs/zboard.php?id=p_qa_new&page=1&sn1=&divpage=4&category=1&sn=off&ss=on&sc=off&keyword=폼메일&select_arrange=headnum&desc=asc&no=19057

최지헌 님이 올리내용입니다.    


최지헌님이 올린 소스입니다. 아래
항목을 추가했는데 보내고 확인해 보면 이름, 이메일 주소, 제목밖에 표시 안되네요.

소스
스크린샷은 링크파일-


----------------------mail.php---------------------------

<html>
<head>
<title>메일 발송</title>
</head>
<body bgcolor="white" text="black" link="black" vlink="black" alink="black">
<form method='post' action='send.php'>

<table border="0" cellpadding="0" cellspacing="0" width="392" align="center">
<tr><td width="392">

                

<span style="font-size:9pt;">
어쩌구

</span>

</table>
<table border="0" cellpadding="0" cellspacing="0" width="392" align="center">
<td width="392">
                

<span style="font-size:9pt;">성명
                </td><td><input type="text" name="name" maxlength="10" size="10" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">발신자 이메일 주소</span>   </td><td><input type="text" name="frommail" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">소속, 직위</span>   </td><td><input type="text" name="grade" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">전화번호</span>   </td><td><input type="text" name="phone" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">팩스번호</span>   </td><td><input type="text" name="fax" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">주소</span>   </td><td><input type="text" name="where" maxlength="35" size="35" style="color:black;">
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">수신자 이메일 주소</span>  
                 </td><td><input type="text" name="tomail" maxlength="35" size="35" style="color:black;" value="css3135@yahoo.co.kr" readonly>
</td>
</tr>
<tr>
<td width="392">
                

<span style="font-size:9pt;">제목</span>  </td><td>
                <input type="text" name="subject" maxlength="35" size="35" style="color:black; ">

</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="392" align="center">
<tr>
<td width="392">
                

<textarea name="body" rows="8" cols="53" style="color:black;"></textarea>


              
</td>
</tr>
<tr>
<td width="392">

<input type="submit" value="메일보내기">  <input type="reset" value="  취  소  ">
                      

</td>
</tr>
</table>
</form>

</html>


---------------------------send.php-------------------------
<?
function error($text){
echo "
<script language=javascript>
window.alert('$text')
history.go(-1)
</script>";
exit;
}

function msg($text){
echo "
<script language=javascript>
window.alert('$text')
</script>
<meta http-equiv='refresh' content='0;url=mail.php'>";
exit;
}


if (!$name) {error('성명을 적어주십시오.');}  // 이름이 없을때 에러 메세지
if(!ereg("@",$frommail)) {error('올바른 발신자 이메일 주소를 적어주십시오.');} // 보내는 메일주소나 @이 없으면 나오는 에러메세지
if (!$grade) {error('소속, 직위를 적어주십시오.');}
if (!$phone) {error('전화번호를 적어주십시오.');}
if (!$fax) {error('팩스번호를 적어주십시오.');}
if (!$where) {error('주소를 적어주십시오.');}
if(!ereg("@",$tomail)) {error('올바른 수신자 이메일 주소를 적어주십시오.');} // 받는 메일주소나 @이 없으면 나오는 에러메세지
if (!$subject) {error('제목을 적어주십시오.');} // 제목을 안적으면 나오는 에러 메세지.
if (!$body) {error('내용을 적어주십시오.');} // 내용을 안적으면 나오는 에러 메세지

$mailheaders .= "Return-Path: $frommail rn"; // 메일 헤더
$mailheaders .= "From: $name <$frommail>rn"; // 메일헤더, 이름과 email 주소가 나오게 함..

$result=mail($tomail , $subject , $body , $mailheaders); // 메일 함수

if($result){msg('메일이 성공적으로 발송되었습니다.');} // 성공하면 나오는 메제시
else{error('메일 발송에 실패하였습니다.');} // 편지가 전달되지 않으면 나오는 함수

?>


이 소스 하단에 보면  최지헌님이 다시 글을 올려 놓았습니다.

스스로 해결 하셨다고...하면서...올린 내용은

$result=mail($tomail , $subject , $body=$grade.$phone.$fax.$where , $mailheaders);

수정해서 되었다고 하셔서..제가 따라 해봤는데.. 안되더군요.


제가 똑같이 따라 했는데도    받는사람은 내용이 전혀 보여지질 않습니다.
아신다면 수정 방법을 자세히 좀 알려 주시면 감사하겠습니다.

글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
안진오 mysql 에서 lcoalhost 주소가 안먹네요.. [2] 2007.08.10
비타민c dump파일복구관련해서 문의드립니다.  
오유경 급한 문제입니다. 꼭좀 답변부탁드릴께요 ㅠㅠ  
amouru 요즘 사이트 만들때 해상도 몰러 해서 만드나요? [5] 2007.08.10
위피 웹디자인 잘하시는분들~! [2] 2007.08.10
빨간고추 회원만 볼수 있는 페이지.. [2] 2007.08.10
명민국 자바스크립트 삭제가 안됩니다..  
젠틀버그 표가 자꾸 깨지네요...ㅠㅜ [1] 2007.08.10
박만영 include 관련 질문이요.. include 하니깐.. 그림이 안뜨는데.. file  
비타민c dump파일복구관련해서 문의드립니다. [2] 2007.08.10
장현우 이미지 랜덤하게 나오는 소스말고 이미지 순차적으로 나오게 하는소스 없나요.  
UGenet 일정한 시간이 되면 링크가 다른 곳으로 되게 만들 수 있나요? [1] 2007.08.10
Jungdos 포토샵 7.0 쓰는데...문제가 있어요...  
One-Kill 제로 카운터 이미지로 만드는 방법이? [1] 2007.08.10
모진형 플레시 하고 HTML이나 PHP하고 연동되게 하는 방법 좀 알려주세요... [2] 2007.08.10
코퍼 웹에서 POP3 읽어주는 메일 프로그램 추천바랍니다. [2] 2007.08.10
하늘구름 아이피에 따라 접속 페이지를 다르게 하는 방법이? [1] 2007.08.10
Woodi 이미지맵 문제  
이건회 mysql 설치후 인터넷이 안되요 ! [1] 2007.08.10
정성용 잘하시는 분들께 물어봅니다.[수정] [1] 2007.08.10
오재호 노프레임에 관한 질문좀 드립니다.... [3] 2007.08.10
오재호 안녕하세요..상업적인 홈페이지를 만들려고 하는데요.. [2] 2007.08.10
스피언트 게시판에서 번호 이어지게 하는 법.. [1] 2007.08.10
박병언 폰트 다운받을때 말이죠... [1] 2007.08.10
치키니aaa 패턴인가요? 알려주세요.. [1] 2007.08.10
이현아 ★★★ 폼 메일 관련 질문 입니다. ( 소스 있습니다) [1] 2007.08.10
젠틀버그 의미전달 분명하게 다시 문합니다... 아이프레임과 링크시키기...꼭알려주세요 ㅜ_ㅜ [4] 2007.08.10
인자기 WIN2000서버 터미널에 관한 질문  
나두몰라 링크 관련 [1] 2007.08.10
모진형 플레시에 대해서 질문 있습니다.