여분필드 문의 드려요ㅠ.ㅠ
본문
<?
$wr_1 = explode("-",$write['wr_1']);
$tel1 = $wr_1[0];
$tel2 = $wr_1[1];
$tel3 = $wr_1[2];
?>
<tr>
<th scope="row">연락처</th>
<td>
<select name="$tel1" id="$tel1" title="연락처" required class="frm_input required">
<option value="">선택하세요</option>
<option value="010" <?=($tel1 == "010")?'selected':'';?>>010</option>
<option value="011" <?=($tel1 == "011")?'selected':'';?>>011</option>
<option value="016" <?=($tel1 == "016")?'selected':'';?>>016</option>
<option value="017" <?=($tel1 == "017")?'selected':'';?>>017</option>
<option value="018" <?=($tel1 == "018")?'selected':'';?>>018</option>
<option value="019" <?=($tel1 == "019")?'selected':'';?>>019</option>
</select> -
<input name="$tel2" type="text" maxlength="4" size="4" class="frm_input required" onkeyup="OnlyNumber(this);" title="연락처 두번째자리" id="$tel2" value="<?php echo $tel2 ?>"> -
<input name="$tel3" type="text" maxlength="4" size="4" class="frm_input required" onkeyup="OnlyNumber(this);" title="연락처 세번째자리" id="$tel3" value="<?php echo $tel3 ?>"></td>
</tr>
===============================================================
write.skin.php파일인데요...여분필드 쪼개서 사용했는데...
게시글 글수정시 쪼갠 필드값만 사라져버리네요....
좀알려주세요....
답변 2
<select name="$tel1" id="$tel1" title="연락처" required class="frm_input required">
...
<input name="$tel2" type="text" maxlength="4" size="4" class="frm_input requ ... id="$tel2"
<input name="$tel3" type="text" maxlength="4" si ..... id="$tel3"
위 볼드 처리 된 부분만
<select name="tel1" tel2 .. tel3
이렇게 변경해주세요 name,id 는 고정이어야 합니다.
네임 선언이 php $ 함수로 선언이 되어 처리되다 보니 전달이 안되는 겁니다.
name 명은 $를 빼고 적용해 주셔야 합니다.