묻고답하기

<?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 남기남
나경한 사람의 동작이 많이 있는 클립아트를 구합니다. [1] 2007.08.10
연(延) 테이블 안에 게시판을.......^^;;;; [2] 2007.08.10
박영창 하루에 한번 자동으로 db 백업하게 만드는 소스 없나요?? [2] 2007.08.10
yoki 소스보기요. [3] 2007.08.10
안병현 프레임 페이지와 노프레임 페이지.. [1] 2007.08.10
kimdahye [re] 주소창과 팝업창이여... [1] 2007.08.10
kimdahye 주소창과 팝업창이여... [1] 2007.08.10
황인석 제로보드설치 경로 [1] 2007.08.10
조용필 리눅스에서 ulimit -a 의 내용수정은 어디서 어떻게하나요? [2] 2007.08.10
이세민(천책상장) 이 CPU들 차이가 뭐징? [2] 2007.08.10
함태준 링크가... 『이미지 있음』 [2] 2007.08.10
레드 제발 도와주세요 ㅠ.ㅜ [1] 2007.08.10
이태홍 asf 파일의 트랙바에 대한 질문이요 [1] 2007.08.10
이승민 좋은 웹호스팅 업체 추천바랍니다. [6] 2007.08.10
김성목 다쉬 질문합니다...주목해주세요~!!노프레임홈... [5] 2007.08.10
BoA 옵션(카테고리)박스에 글자가 안나와요  
초짜배기 [하드웨어] 램 인식이 안되네여...  
김지혁 php 시계 만들기 2번째 질문입니당. [2] 2007.08.10
함태준 롤오버에 따른 하이퍼링크 [이미지 링크] [1] 2007.08.10
뿌니 배경화면이여~  
제플™ 자바스크립트 난수에 대한 질문이예요..^^ [2] 2007.08.10
김성미 스킨에 웹정체 설정 워떻게.. [3] 2007.08.10
무돌이 파일의 경로에 대해서...  
정희천 mms:// 다운로드받기 [3] 2007.08.10
limey php관련 폼메일에서.. [1] 2007.08.10
구욱서 홈페이지 제작시! 위,아래,좌,우! 생기는 여백 없애는 법좀 알려주세요 [2] 2007.08.10
오픈소스 [re] 폰트 관련 질문.  
뜨레 폰트 관련 질문.  
정혜선 로그인이 안되는데요. [1] 2007.08.10
김지혁 자바 시계와 php구문 연결에 대한 질문입니당. [1] 2007.08.10