묻고답하기

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

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

=============
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 남기남
SADF 몇일 째 고민하고 있어요 좀 부탁드릴께요 도와주세요.[bgm]loveplyer 6.4 재생질문..  
최정욱 노프레임 사이트 만들기 질문요ㅠ.ㅠ [1] 2007.08.10
유영민 프로그래밍배우는 초보입니다~고수분들꼭좀 부탁드립니다. [1] 2007.08.10
우라질넘 외부로그인 응용... [1] 2007.08.10
goa 그라데이션  
완규 프레임셋을 만들때..이렇게 해도 문제 없을까요? [1] 2007.08.10
완규 자바스크립트에서 변수 선언할 때요..  
로보로보 링크한 파일의 주소가 mp3 일때 실행안되고 다운로드 받게 하는방법!  
miyo bgm 이 나오질 않네요. 뭐가 잘못된건지 좀 봐주세요.  
축구와사람들 플래시 타겟 지점 좀 알려주세요 [1] 2007.08.10
이슬기 ★급! 인덱스 화면에 이미지가 않떠요 [1] 2007.08.10
이재민 횽아들 저 아주 급한 질문이 있는데요.... [2] 2007.08.10
kiss119s 포토샵 페인트통툴에서 테두리가 선명하지 않아요- [1] 2007.08.10
‡다윈‡ 홈페이지 접속할때 마다.. [1] 2007.08.10
요요 사이트 위아래로 슬라이딩되는 이미지나 메뉴 [1] 2007.08.10
peace 모니터링  
나야나 php 배우고 싶은 초보입니다... [1] 2007.08.10
토리 쇼핑몰에 사용되는 장바구니 로그인폼 등등 [1] 2007.08.10
이주현 제로보드 정렬 방법 문의 [1] 2007.08.10
Aerou 몇초간격으로 자동으로 링크클릭  
오타대마왕 PHP로 적분을 해야 하는데....  
윤영미 포토샵 레이어 팔래트에서 하단 연결고리 없애는방법좀ㅜ.ㅜ  
정지웅 플래쉬에서 다이나믹 텍스트로 폰트 첨부(임베디드) 해도, 영문만 나옵니다.  
우디 인클루드 정말 궁금한데요... [1] 2007.08.10
울혼 클라이언트에게 작업물(홈피) 넘겨줄때요..  
윤동혁 질문좀 할꼐요... [1] 2007.08.10
김선경 셀렉트박스 목록을 위쪽방향으로  
정식 로그인 해야만 페이지에 접속할수 있고 절대경로 홈페이지 접속에 관한 질문 [2] 2007.08.10
우디 html링크와 인클루드...그림저장... [2] 2007.08.10
alal 퀵메뉴 설치하는데.. 잘 안되네요.