묻고답하기

<?php

//==================
// 메일 보내기
//==================

function message ($message)
{
echo "
        <script>
        window.alert ("$message");
        history.go(-1);
        </script>
        ";
exit;
}

if($mode=='mailsend')
{
        if(!$to) message ("받으실분의 메일계정을 입력하세요");
        if(!$subject) message ("제목을 입력하세요");
        if(!$body) message ("내용을 입력하세요");

       $mailheaders .= "Return-Path: $fromrn";
       $mailheaders .= "From: $rn <$from>rn";
       $mailheaders .= "X-Mailer: Gfew Interfacern";

       if ($userfile && $userfile_size) {

          $filename=basename($userfile_name);
          $result=fopen($userfile,"r");
          $file=fread($result,$userfile_size);
          fclose($result);

          if ($userfile_type == "")
             {
             $userfile_type = "application/octet-stream";
             }

          $boundary = "--------" . uniqid("part");

          $mailheaders .= "MIME-Version: 1.0rn";
          $mailheaders .= "Content-Type: multipart/mixed; boundary="$boundary"";

          $bodytext  = "This is a multi-part message in MIME format.rnrn";
          $bodytext .= "--$boundaryrn";

          $bodytext .= "Content-Type: text/html; charset=euc-krrn";
          $bodytext .= "Content-Transfer-Encoding: 8bitrnrn";

          $bodytext .= nl2br(stripslashes($body)) . "rnrn";
          $bodytext .= "--$boundaryrn";
          $bodytext .= "Content-Type: $userfile_type; name="$filename"rn";
          $bodytext .= "Content-Transfer-Encoding: base64rnrn";
          $bodytext .= ereg_replace("(.{80})","\1rn",base64_encode($file));
          $bodytext .= "rn--$boundary" . "rn";
       }
       else {
          $bodytext  = stripslashes($body);
       }


       mail($to,$subject,$bodytext,$mailheaders);

       echo(" <meta http-equiv='Refresh' content='0; URL=./mailsuccess.php3'>");
       exit;


}

echo "
<html>
<head>
<title>Formmail</title>
<meta http-equiv=Content-Type content=text/html; charset=euc-kr>
<link rel=StyleSheet HREF='desizn.css' type='text/css'>
</head>
<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<br>
  <table width=300 border=1 cellspacing=0 align='center' cellpadding='2'+ '+ ' bordercolordark=white bordercolorlight=black>
    <tr>
    <form enctype='multipart/form-data' method='post' action='$PHP_SELF?mode=mailsend'>
      <td align=center bgcolor=cccccc width=130>받는사람</td>
      <td bgcolor=white width=170><input name=to size=30 value='limey75@dreamwiz.com' class=bdc> </td>
    </tr>
    <tr>
      <td align=center bgcolor=cccccc>보내는사람</td>
      <td bgcolor=white> <input name=from size=30 value='' class=bdc> </td>
    </tr>
    <tr>
      <td align=center bgcolor=cccccc>제 목</td>
      <td bgcolor=white> <input name=subject size=30 value='' class=bdc> </td>
    </tr>
    <tr>
      <td align=center bgcolor=cccccc> 파일첨부</td>
      <td bgcolor=white> <input type=file name=userfile size=15 value='' class=bdc> </td>
    </tr>
    <tr>
      <td colspan=2 bgcolor=white>
        <textarea name=body cols=45 rows=7 wrap=hard class=bdc></textarea>
      </td>
    </tr>
    <tr>
      <td colspan=2 height=22 bgcolor=white>
        <div align='center'>
          <input type=submit name=action value=':: SEND ::' class=btc>
          <input type='reset' name='Reset' value=':: RESET ::' class=btc>
        </div>
      </td></form>
    </tr>
  </table>
<br>
</body>
</html>
";


?> 여기까진 formmail.html 이구여..


여기서부턴 mailsuccess.php3 파일이요..

<?php
echo "
<html>
<head>
<title>Formmail</title>
<meta http-equiv=Content-Type content=text/html; charset=euc-kr>
<link rel=StyleSheet HREF='desizn.css' type='text/css'>
</head>
<body bgcolor=#FFFFFF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>
<br>
<table width=100% height=100%>
<tr><td align=center>
메일이 성공적으로 전송되었습니다.<br>
이 화면은 자동으로 5초 후에 이전화면으로 돌아갑니다.
<meta http-equiv='Refresh' content='5; URL=./formmail.html'>
<p>
</td></tr></table>
</body></html>
";
?>

위의 폼메일 그니까 formmail.html을 테이블 안에 넣어야 하는데..도무지 안되네여..

위의 소스는 해피cgi에서 얻어온건데.. 제 홈페이지에 폼메일 형식으로 넣고 싶어서 그러거든요..

나모나 드림위버에선 당근 formmail.html파일이 안열리구..

파일명만 html이지 php쏘스가 들어가있어서 그런거 같은데..

ftp에 단독으루 formmail.html 이랑 mailsuccess.php3 을 올려놓구 제 홈페이지주소/formmail.html 치면  폼메일이 보이거든여..

근데 그러면 폼메일만 달랑 한 화면에 나오게 보여서..

제가 디자인한 화면에 그니까 테이블속에 위의 폼메일을 넣구 싶은데 어떻게 방법이 없을까요?

고수님들 꼭좀 부탁 드릴께요..

넘 바보같은 질문같지만.. 제가 php를 잘 몰라가지구여..책에두 이런내용은 없는거 같구..

오늘 php관련 홈페이지 무쟈게 뒤졌는데두..무식한게 죄네용-.-;;++

바쁘시겠지만 부탁좀 드립니다.. 꼭좀 답변해주세요..


글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
줄리아22 익스프롤러 로그인 오류 [1] 2015.08.08 by 기진곰
배워서남준다 포럼 모듈에서 내용에 specialists 단어 오류  
너와나의농촌 특정 메뉴만 모바일 최적화로 보려고 하는데요. [1] 2015.08.08 by I-JEX
연화동 해외사이트 결제오류 관련 - 사례합니다  
사랑해요XE 랜덤 이미지 스크립트 총 이미지 3개에서 6개로 뿔리려면 어떻게 해야 하나요? [2] 2015.08.08 by 사랑해요XE
aaa 사이트가 해킹을 당했습니다... [1] 2015.08.07 by 기진곰
DoubleCheck centos6.6 에서 laravel 세팅해 보신 분 계시나요? [1] 2015.08.07 by YJSoft
웅ㅋ php 및 xe 버전 확인 방법 [3] 2015.08.07 by 라자루스
꾸링 네이버 섬네일 기능..? [2] 2015.08.07 by YJSoft
ttt22 특정게시판에만 아이콘 바꾸기 [4] 2015.08.07 by ttt22
판다큐브 비밀글 클릭시 나오는 화면에서, 작성날짜와 조회수를 숨기고 싶습니다 [2] 2015.08.07 by 라자루스
로봇보이 스킨 값은 필수 입니다 << 에러 file  
토닥토닥 사이트에 사진 업로드가 안됩니다. [2] 2015.08.07 by 토닥토닥
꿈틀잉 1.5에서 1.7.9로 업데이트후 사이트메뉴 먹통 질문 [1] file 2015.08.07 by 라자루스
사랑해요XE 사이트 전체 html 보려면 ftp 에서 어디로 들어가야 볼수있나요? [4] file 2015.08.07 by I-JEX
사랑해요XE 이미지 출력이 안됩니다.. [3] file 2015.08.07 by I-JEX
뉴질맨 자료는 존재하는데 리스트에 나오지 않습니다. [2] file 2015.08.07 by 뉴질맨
윤이이뻐 업데이트후 "내용직접추가" 가 안됨니다.. [2] file 2015.08.07 by 윤이이뻐
14학번김영경 꼭 봐주세용!!!!ㅠㅠㅠㅠㅠ 도움이 정말정말 필요하답니다~ [1] 2015.08.07 by 25시
아까거기서 특정 게시판의 일정 기간 이전의 게시물의 첨부 파일만 삭제하는