묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
php공부하는 초짜인데 틀린거 같은데 어디가 어떻게 틀린건지...(조금 김)
2003.04.30 00:43
mail.htm
__________________________________________________________________________________________
<html>
<head>
<title>주문자 정보</title>
<meta name="generator" content="Namo WebEditor v3.0">
<style type="text/css">
<!--
Body {font-size:9pt;font-family:굴림;color:black;line-height: 12pt}
.editbox {
BACKGROUND-COLOR: #F4F4F4;
BORDER-BOTTOM: silver 1px solid;
BORDER-LEFT: silver 1px solid;
BORDER-RIGHT: silver 1px solid;
BORDER-TOP: silver 1px solid;
COLOR: black;
font-size:9pt;font-family:verdana, 굴림;color:black;}
.aa {
border: silver 1px groove;
}
//-->
</style>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="437" colspan="2"><form method="post" action="mail_2.php">
<input type=hidden name="redirect" value="http://www.babyvod.com"> <p
align="left"><font color="#497CFF"><b>주문자 정보</b></font><b><br></b>
</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>이름</b></font></td>
<td width="325"><p><input type="text" name="name" size="8" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>주소</b></font></td>
<td width="325"><p><input type="text" name="juso" size="50" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>연락처</b></font></td>
<td width="325"><p><input type="text" name="phone" size="16" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>아기이름</b></font></td>
<td width="325"><p><input type="text" name="babynanme" size="8" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>아기성별</b></font></td>
<td width="325"><p><input type="radio" name="babysex" value="남자">남자 <input
type="radio" name="babysex" value="여자">여자</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>돌잔치 날짜,시간</b></font></td>
<td width="325"><p><input type="text" name="dol_m" size="2" class="editbox">월<input
type="text" name="dol_d" size="2" class="editbox">일<input type="text"
name="dol_t" size="2" class="editbox">시</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>태어난 날짜,시간</b></font></td>
<td width="325"><p><input type="text" name="birthday_n" size="2" class="editbox">년<input
type="text" name="birthday_m" size="2" class="editbox">월<input
type="text" name="birthday_d" size="2" class="editbox">일 오전<input
type="radio" name="tim" value="오전"> 오후<input type="radio" name="tim"
value="오후"><input type="text" name="birthday_t" size="2" class="editbox">시</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="437" colspan="2"><p> <br> </td>
</tr>
<tr>
<td width="437" colspan="2"><p align="left"><font color="#497CFF"><b>주문내역<br></b></font>
</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>탄생일보</b></font></td>
<td width="325"><p><input type="checkbox" name="t1m" value="신청함">1면 <input
type="checkbox" name="t2m" value="신청함">2면</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>사진보드</b></font></td>
<td width="325"><p><input type="checkbox" name="s_a" value="신청함">A형 <input
type="checkbox" name="s_b" value="신청함">B형</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>덕담보드</b></font></td>
<td width="325"><p><input type="checkbox" name="d_a" value="신청함">A형</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>감사장</b></font></td>
<td width="325"><p><input type="text" name="gamsa" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>쇼핑백</b></font></td>
<td width="325"><p><input type="text" name="shopping" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>엘리베이터안내문</b></font></td>
<td width="325"><p>A형<input type="text" name="el_anne_a" size="2" class="editbox">장 B형<input
type="text" name="el_anne_b" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>번호표</b></font></td>
<td width="325"><p><input type="text" name="nember" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>보드제목 글씨</b></font></td>
<td width="325"><p><input type="radio" name="vodup" value="신청함">신청함 <input
type="radio" name="vodup" value="신청안함">신청안함</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
</table>
<p><input type="submit" value="제 출" style="font-family:굴림체; font-size:10pt;"></p></form>
</body>
</html>
______________________________________________________________________________________________
mail_2.php
______________________________________________________________________________________________
<?
if($t1m){$t1m=50000;} else{$t1m=0;}
if($t2m){$t2m=50000;} else{$t2m=0;}
if($s_a){$s_a=50000;} else{$s_a=0;}
if($s_b){$s_b=50000;} else{$s_b=0;}
if($d_a){$d_a=50000;} else{$d_a=0;}
if(!$gamsa){
$gamsa=0;exit;
}
elseif($gamsa<35){
$gamsa=10000; exit;
}
elseif($gamsa<45){
$gamsa=20000; exit;
}
elseif($gamsa<55){
$gamsa=30000; exit;}
elseif($gamsa<65){
$gamsa=40000; exit;}
elseif($gamsa<75){
$gamsa=50000; exit;}
elseif($gamsa<85){
$gamsa=50000; exit;}
elseif($gamsa<95){
$gamsa=60000; exit;}
elseif($gamsa<105){
$gamsa=80000; exit;}
if(!$shopping){
$shopping=0;}
elseif($shopping<35){
$shopping=10000; exit;}
elseif($shopping<45){
$shopping=20000; exit;}
elseif($shopping<55){
$shopping=30000; exit;}
elseif($shopping<65){
$shopping=40000; exit;}
elseif($shopping<75){
$shopping=50000; exit;}
elseif($shopping<85){
$shopping=60000; exit;}
elseif($shopping<95){
$shopping=70000; exit;}
elseif($shopping<105){
$shopping=80000; exit;}
if(!$el_anne_a){
$el_anne_a=0;}
elseif($el_anne_a<4){
$el_anne_a=10000; exit;}
elseif($el_anne_a<5){
$el_anne_a=20000; exit;}
elseif($el_anne_a<6){
$el_anne_a=30000; exit;}
elseif($el_anne_a<7){
$el_anne_a=40000; exit;}
elseif($el_anne_a<8){
$el_anne_a=50000; exit;}
if(!$el_anne_b){
$el_anne_a=0;}
elseif($el_anne_b<4){
$el_anne_b=10000; exit;}
elseif($el_anne_b<5){
$el_anne_b=20000; exit;}
elseif($el_anne_b<6){
$el_anne_b=30000; exit;}
elseif($el_anne_b<7){
$el_anne_b=40000; exit;}
elseif($el_anne_b<8){
$el_anne_b=50000; exit;}
if(!$nember){
$nember=0;}
elseif($nember<35){
$nember=10000; exit;}
elseif($nember<45){
$nember=20000; exit;}
elseif($nember<55){
$nember=30000; exit;}
elseif($nember<65){
$nember=40000; exit;}
elseif($nember<75){
$nember=50000; exit;}
elseif($nember<85){
$nember=60000; exit;}
elseif($nember<95){
$nember=70000; exit;}
elseif($nember<105){
$nember=80000; exit;}
if($vodup){$vodup=50000;} else{$vodup=0;}
echo "$t1m + $t2m + $s_a + $s_b + $d_a + $gamsa + $shopping + $el_anne_a + $el_anne_b + $nember + $vodup";
?>
_________________________________________________________________________________________________
이렇게 하면은 mail_2.php에서 각각의 값들이 더해져서 총합이 나와야 돼는거 아닌가요?
아니면 문법자체가 틀린건가?....
__________________________________________________________________________________________
<html>
<head>
<title>주문자 정보</title>
<meta name="generator" content="Namo WebEditor v3.0">
<style type="text/css">
<!--
Body {font-size:9pt;font-family:굴림;color:black;line-height: 12pt}
.editbox {
BACKGROUND-COLOR: #F4F4F4;
BORDER-BOTTOM: silver 1px solid;
BORDER-LEFT: silver 1px solid;
BORDER-RIGHT: silver 1px solid;
BORDER-TOP: silver 1px solid;
COLOR: black;
font-size:9pt;font-family:verdana, 굴림;color:black;}
.aa {
border: silver 1px groove;
}
//-->
</style>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="437" colspan="2"><form method="post" action="mail_2.php">
<input type=hidden name="redirect" value="http://www.babyvod.com"> <p
align="left"><font color="#497CFF"><b>주문자 정보</b></font><b><br></b>
</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>이름</b></font></td>
<td width="325"><p><input type="text" name="name" size="8" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>주소</b></font></td>
<td width="325"><p><input type="text" name="juso" size="50" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>연락처</b></font></td>
<td width="325"><p><input type="text" name="phone" size="16" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>아기이름</b></font></td>
<td width="325"><p><input type="text" name="babynanme" size="8" class="editbox"></td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>아기성별</b></font></td>
<td width="325"><p><input type="radio" name="babysex" value="남자">남자 <input
type="radio" name="babysex" value="여자">여자</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>돌잔치 날짜,시간</b></font></td>
<td width="325"><p><input type="text" name="dol_m" size="2" class="editbox">월<input
type="text" name="dol_d" size="2" class="editbox">일<input type="text"
name="dol_t" size="2" class="editbox">시</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>태어난 날짜,시간</b></font></td>
<td width="325"><p><input type="text" name="birthday_n" size="2" class="editbox">년<input
type="text" name="birthday_m" size="2" class="editbox">월<input
type="text" name="birthday_d" size="2" class="editbox">일 오전<input
type="radio" name="tim" value="오전"> 오후<input type="radio" name="tim"
value="오후"><input type="text" name="birthday_t" size="2" class="editbox">시</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="437" colspan="2"><p> <br> </td>
</tr>
<tr>
<td width="437" colspan="2"><p align="left"><font color="#497CFF"><b>주문내역<br></b></font>
</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>탄생일보</b></font></td>
<td width="325"><p><input type="checkbox" name="t1m" value="신청함">1면 <input
type="checkbox" name="t2m" value="신청함">2면</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>사진보드</b></font></td>
<td width="325"><p><input type="checkbox" name="s_a" value="신청함">A형 <input
type="checkbox" name="s_b" value="신청함">B형</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>덕담보드</b></font></td>
<td width="325"><p><input type="checkbox" name="d_a" value="신청함">A형</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>감사장</b></font></td>
<td width="325"><p><input type="text" name="gamsa" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>쇼핑백</b></font></td>
<td width="325"><p><input type="text" name="shopping" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>엘리베이터안내문</b></font></td>
<td width="325"><p>A형<input type="text" name="el_anne_a" size="2" class="editbox">장 B형<input
type="text" name="el_anne_b" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>번호표</b></font></td>
<td width="325"><p><input type="text" name="nember" size="2" class="editbox">장</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
<tr>
<td width="112"><p align="left"><font color="gray"><b>보드제목 글씨</b></font></td>
<td width="325"><p><input type="radio" name="vodup" value="신청함">신청함 <input
type="radio" name="vodup" value="신청안함">신청안함</td>
</tr>
<tr>
<td width="437" height="1" colspan="2" bgcolor="silver"></td>
</tr>
</table>
<p><input type="submit" value="제 출" style="font-family:굴림체; font-size:10pt;"></p></form>
</body>
</html>
______________________________________________________________________________________________
mail_2.php
______________________________________________________________________________________________
<?
if($t1m){$t1m=50000;} else{$t1m=0;}
if($t2m){$t2m=50000;} else{$t2m=0;}
if($s_a){$s_a=50000;} else{$s_a=0;}
if($s_b){$s_b=50000;} else{$s_b=0;}
if($d_a){$d_a=50000;} else{$d_a=0;}
if(!$gamsa){
$gamsa=0;exit;
}
elseif($gamsa<35){
$gamsa=10000; exit;
}
elseif($gamsa<45){
$gamsa=20000; exit;
}
elseif($gamsa<55){
$gamsa=30000; exit;}
elseif($gamsa<65){
$gamsa=40000; exit;}
elseif($gamsa<75){
$gamsa=50000; exit;}
elseif($gamsa<85){
$gamsa=50000; exit;}
elseif($gamsa<95){
$gamsa=60000; exit;}
elseif($gamsa<105){
$gamsa=80000; exit;}
if(!$shopping){
$shopping=0;}
elseif($shopping<35){
$shopping=10000; exit;}
elseif($shopping<45){
$shopping=20000; exit;}
elseif($shopping<55){
$shopping=30000; exit;}
elseif($shopping<65){
$shopping=40000; exit;}
elseif($shopping<75){
$shopping=50000; exit;}
elseif($shopping<85){
$shopping=60000; exit;}
elseif($shopping<95){
$shopping=70000; exit;}
elseif($shopping<105){
$shopping=80000; exit;}
if(!$el_anne_a){
$el_anne_a=0;}
elseif($el_anne_a<4){
$el_anne_a=10000; exit;}
elseif($el_anne_a<5){
$el_anne_a=20000; exit;}
elseif($el_anne_a<6){
$el_anne_a=30000; exit;}
elseif($el_anne_a<7){
$el_anne_a=40000; exit;}
elseif($el_anne_a<8){
$el_anne_a=50000; exit;}
if(!$el_anne_b){
$el_anne_a=0;}
elseif($el_anne_b<4){
$el_anne_b=10000; exit;}
elseif($el_anne_b<5){
$el_anne_b=20000; exit;}
elseif($el_anne_b<6){
$el_anne_b=30000; exit;}
elseif($el_anne_b<7){
$el_anne_b=40000; exit;}
elseif($el_anne_b<8){
$el_anne_b=50000; exit;}
if(!$nember){
$nember=0;}
elseif($nember<35){
$nember=10000; exit;}
elseif($nember<45){
$nember=20000; exit;}
elseif($nember<55){
$nember=30000; exit;}
elseif($nember<65){
$nember=40000; exit;}
elseif($nember<75){
$nember=50000; exit;}
elseif($nember<85){
$nember=60000; exit;}
elseif($nember<95){
$nember=70000; exit;}
elseif($nember<105){
$nember=80000; exit;}
if($vodup){$vodup=50000;} else{$vodup=0;}
echo "$t1m + $t2m + $s_a + $s_b + $d_a + $gamsa + $shopping + $el_anne_a + $el_anne_b + $nember + $vodup";
?>
_________________________________________________________________________________________________
이렇게 하면은 mail_2.php에서 각각의 값들이 더해져서 총합이 나와야 돼는거 아닌가요?
아니면 문법자체가 틀린건가?....