여분필드 문의 드려요ㅠ.ㅠ

여분필드 문의 드려요ㅠ.ㅠ

QA

여분필드 문의 드려요ㅠ.ㅠ

본문

  <?
  $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 명은 $를 빼고 적용해 주셔야 합니다.

답변을 작성하시기 전에 로그인 해주세요.
전체 55
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT