묻고답하기

고수님들 도와주세요~~~

파일첨부는 어떻게 만드나요????

=============
1. html로 메일 발송 폼

===================================================================

<★HTML>
<★HEAD>
<★TITLE>stylematin form-mail<★/TITLE>
<★META NAME="Generator" CONTENT="EditPlus">
<★META NAME="Author" CONTENT="">
<★META NAME="Keywords" CONTENT="">
<★META NAME="Description" CONTENT="">
<★/HEAD>

<★BODY>
<★form method='post' action='result.php'>
                            <★table width="1013" align="center">
                              <★tr>
                                <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">* 이름<★/span><★/td>
                                <★td width="929">
                                  <★input type="text" name="name" maxlength="35" style="height:20; width:160" size="35"><★/td>
                              <★/tr>
        <★tr>
            <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">* <★/span><★span style="font-size:8pt;">회사<★/span><★/td>
                                <★td width="929">
                                  <★input type="text" name="company" maxlength="35" style="height:20; width:160" size="35"><★/td>
        <★/tr>
        <★tr>
            <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">* <★/span><★span style="font-size:8pt;">전화번호<★/span><★/td>
                                <★td width="929">
                                  <★input name="tel" type="text" id="tel" size="26" maxlength="26"><★/td>
        <★/tr>
                              <★tr>
                                <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">팩스번호<★/span><★/td>
                                <★td width="929">
                                  <★input name="fax" type="text" id="tel" size="26" maxlength="26"><★/td>
                              <★/tr>
        <★tr>
            <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">* <★/span><★span style="font-size:8pt;">이메일<★/span><★/td>
                                <★td width="929">
                                  <★input type="text" name="email" maxlength="35" style="height:20; width:160" size="35"><★/td>
        <★/tr>
                              <★tr>
                                <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">주소<★/span><★/td>
                                <★td width="929">
                                  <★input type="text" name="ad" maxlength="100" style="height:20; width:300" size="51"><★/td>
                              <★/tr>
        <★tr>
            <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">품명<★/span><★/td>
                                <★td width="929">
                                  <★input type="text" name="goods" maxlength="50" style="height:20; width:316" size="50"><★/td>
        <★/tr>
        <★tr>
            <★td align="center" height="22" width="73" bgcolor="white"> <★span style="font-size:8pt;">* <★/span><★span style="font-size:8pt;">제목<★/span><★/td>
                                <★td width="929">
                                  <★input type="text" name="subject" maxlength="50" style="height:20; width:316" size="50"><★/td>
        <★/tr>
        <★tr>
            <★td height="172" align="center" bgcolor="white" width="73">
<★span style="font-size:8pt;">* <★/span><★span style="font-size:8pt;">문의사항<★/span><★/td>
                                <★td height="172" width="929"><★textarea name="content" rows="13" cols="51"><★/textarea><★/td>
        <★/tr>
                              <★tr>
            <★td align="center" height="50" colspan="2" width="1007">
                <★p align="left">                                  <★input name="submit" type="submit" style="font-family:굴림; font-size:9pt; background-color:white; border-width:1px; border-color:black; border-style:dashed; height:20px; width=50;" value="OK">
                                  <★input name="reset" type="reset" style="font-family:굴림; font-size:9pt; background-color:white; border-width:1px; border-color:black; border-style:dashed; height:20px; width=50;" value="Cancel"><★/p>
            <★/td>
                              <★/tr>
                            <★/table>
<★/form>
<★/BODY>
<★/HTML>
===================================================================



2. 발송하는 php코딩

===================================================================

<?

$tomail = "받는 사람 주소"; //이 폼메일을 받을 메일주소


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')
  top.location.href = 'http://itag.mireene.com/index.php'
  </script>
";
exit;
}

if (!$name) {error('성명을 적어주세요');} // 이름이 없을때 에러 메세지
if (!$email) {error('메일 주소를 적어주세요');} // 메일주소가 없을때 에러 메세지
if (!$subject) {error('제목을 적어주세요');} // 제목이 없을때 에러 메세지



$mailheaders = "Return-Path: $email rn"; // 메일 헤더의 반송 메일 주소
$mailheaders .= "From: $name <$email>rn"; // 메일헤더의 이름과 메일 주소 표시

$body = " 이름 : $name rn";
$body .= " E-mail : $email rn";
$body = " 회사 : $company rn";
$body .= " TEL : $tel rn";
$body .= " FAX : $fax rn";
$body .= " 주소 : $ad rn";
$body .= " 품명 : $goods rn";
$body .= " 문의내용 : $content rn";

$result=mail($tomail , $subject , $body , $mailheaders); // 메일 전송

if($result) {msg('메일이 성공적으로 발송되었습니다.');} // 전송 성공시

else{error('메일 발송에 실패하였습니다.');} // 전송 실패시

?>
===================================================================



일단 메일은 즉각즉각 잘 가는데요.....파일첨부버튼 추가 해서 첨부를 좀 하고 싶어요~~~어떻게 해야되나요???
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
정식 로그인 해야만 페이지에 접속할수 있고 절대경로 홈페이지 접속에 관한 질문 [2] 2007.08.10
우디 html링크와 인클루드...그림저장... [2] 2007.08.10
alal 퀵메뉴 설치하는데.. 잘 안되네요.  
이연호 폼메일을 만들었는데, 파일첨부기능은 어떻게 하는건지 모르겟네요ㅠㅠ  
dicksam 플래쉬로 강의 동영상 만들기 [1] 2007.08.10
Dredroad[炫] Div를 써서 레이어로 작업할경우 레이어 안쪽에 iframe태그가 존재하면 다른 레이어가 감춰지는 현상  
이주현 로그인 팝업창 어떻게 해야되나요??  
이안현 외부로그인 설정을 도대체 어떻게..? [1] 2007.08.10
난다요 ㅁㄴㅇㄴㅁㅇㅁㄴ [1] 2007.08.10
민순기 정말 너무너무 궁금한 질문, 제발 답변 좀 부탁합니다. [1] 2007.08.10
제키 가상호스팅을 하려구 하는데요..도와주삼 ㅠㅠ  
홍용후 회선이 괜찮을까요? [1] 2007.08.10
김범주 저에게 조언을 부탁합니다.  
투헤븐 Prepared Statement 를 ASP에서 쓰고 싶습니다.  
심철환 호스팅 경로와 도메인 경로 문제  
울혼 요즘 웹디자이너분들은 작업을 어떻게 하시나요?  
김신중 이것을 head와 foot로 나눠주세요 [3] 2007.08.10
서승호 apmsetup를 설치했는데 크레이지보드가 되지 않아요.. [제로보드는 잘 되고...] [1] 2007.08.10
EmulBoy 플래쉬 효과중 흐릿하게 하는 효과....?  
박준영 포토샾에서 이런기능 어떻게 사용하나요?  
박준영 PHP 이제 막 시작하는 신참입니다.. [3] 2007.08.10
서승호 apmsetup관련 문의  
남창극 폼양식에 대한 문의 [5] 2007.08.10
김유진 여쭤볼게 있습니다..ㅠㅠ [1] 2007.08.10
김유진 여쭤볼게 있습니다..ㅠㅠ [1] 2007.08.10
GeneE 홈페이지에 암호를 걸고 싶은데요 ㅠㅠ [1] 2007.08.10
구라12단 버튼클릭시 현재창에 레이어처럼 [팝업] 뛰우는 기능이 가능한가요?!  
민순기 꼭 알고 싶어요, 답변 부탁드립니다.  
투헤븐 L7 로드밸런싱 설정 장애...  
이상훈 입력폼 내에서 자동 계산식을 넣으려면 ...... [3] 2007.08.10