묻고답하기

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

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

=============
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 남기남
팝콘 cgi게임을 설치하려는데요...  
김용대 php로 파일업로드 스크립트를 만들면..  
무꾸 메일이 리턴되었습니다. 이메세지는 무슨이유인지.. [2] 2007.08.10
권혁철 노페레임에서 화면의 위치  
꿀상 ''embed'' 태그를 이용해 삽입한 미디어가 나오지 않습니다.  
정상구 n@log에 대해서 궁금한점이 있어요... [4] 2007.08.10
꾸러기^^ 인클루드문제... [1] 2007.08.10
해랑 플래시로 뮤직비디오 만들때..시간은 대체.. [1] 2007.08.10
Millth 최근게시물에서 링크로 게시판으로 넘어갈때...  
하성우 php에 대한 질문입니다.. [1] 2007.08.10
해랑 플래시 MX에서 액션창을 팝업으로 못 띄우나요?? [3] 2007.08.10
이하영 제로보드를 참고 해가면서 회원 매일링을 만들었는데..  
가을의전설™ onclick 하고 drag 랑 같이 효과를 줬는데 drag를 한후 마우스 왼쪽버튼에서 손때면 onclick옵션까지 되는데 해결책좀 알려주세요 (__)*  
정재원 sql 읽을때 [2] 2007.08.10
blueio [re] 이런이미지 어떤 프로그램으로 만드나요?  
이승재 이런이미지 어떤 프로그램으로 만드나요? [3] 2007.08.10
이승준 웹폰트를 제로보드에 적용시킬때... [2] 2007.08.10
한경진 -ㅁ- 인덱스 브라우저 크기를 줄일 수 있나용? [2] 2007.08.10
해랑 RAM 파일을 대체 어떻게 볼 수 있을까요..ㅠ.ㅠ [2] 2007.08.10
세바스챤_™ 뒤로가서 새로고침 하는법 아시는분~~ [1] 2007.08.10