글작성 페이지에서 g5_board 테이블로 값이 들어갈 수 있게 할 수 있나요

글작성 페이지에서 g5_board 테이블로 값이 들어갈 수 있게 할 수 있나요

QA

글작성 페이지에서 g5_board 테이블로 값이 들어갈 수 있게 할 수 있나요

본문

글쓰기 페이지에서 사용여부에 따라

 

사용시 - 상하

미사용시-좌우

 

이런 식으로 나오는 에디터가 다르게 분기를 주고싶습니다.

분기 자체는 제대로 들어가고 그에 따라 폼이 달라지지만 분기적용 후 글 수정을 하면 수정이 되지 않습니다. 이상한 건 분기를 없애고 나면 수정도 멀쩡하게 된다는 것입니다.

어디가 문제일까요?

 

 

 


<tr>
            <th scope="row"><label for="wr_12">사용여부<strong class="sound_only">필수</strong></label></th>
            <td>
 
                <input type="radio" name="wr_12" value="on" id="frm_use_on" required checked <?php if ($write['wr_12'] == 'on') echo 'checked' ?>><label for="frm_use_on">사용   </label>
                <input type="radio" name="wr_12" value="off" id="frm_use_off" required <?php if ($write['wr_12'] == 'off') echo 'checked' ?>><label for="frm_use_off">사용 안함</label>
 
            </td>
        </tr>

 
        <?php }?>
 
        <tr>
            <th scope="row"><label for="wr_subject">제목<strong class="sound_only">필수</strong></label></th>
            <td><input type="text" name="wr_subject" value="<?php echo $subject ?>" id="wr_subject" required class="frm_input required"></td>
        </tr>
        <tr><th colspan="2">신청 폼 사용 여부에 따라 상/하단 폼과 좌/우단 폼이 노출됩니다.</th></tr>
        <?php if($write['wr_12']=='on'){?>
            <tr>
                <th scope="row"><label for="wr_11">상단</label></th>
                <td class="wr_content">
                    <?php echo editor_html("wr_11", $write['wr_11'], $is_dhtml_editor); ?>
                </td>
            </tr>
 
            <tr>
                <th scope="row"><label for="wr_7">하단</label></th>
                <td class="wr_content">
                    <?php echo editor_html("wr_7", $write['wr_7'], $is_dhtml_editor); ?>
                </td>
            </tr>
        <?php }else{ ?>
            <tr>
                <th scope="row"><label for="wr_13">좌단</label></th>
                <td class="wr_content">
                    <?php echo editor_html("wr_13", $write['wr_13'], $is_dhtml_editor); ?>
                </td>
            </tr>
 
            <tr>
                <th scope="row"><label for="wr_14">우단</label></th>
                <td class="wr_content">
                    <?php echo editor_html("wr_14", $write['wr_14'], $is_dhtml_editor); ?>
                </td>
            </tr>
        <?php } ?>
 

이 질문에 댓글 쓰기 :

답변 1

wr_12 는 글 작성이 완료되어야만 데이터가 업데이트 될텐데, 작성중에 wr_12 값을 가져올 수가 없어서 else 구문안에 있는 wr_13, wr_14 만 출력될 것 같은데요....??

글 작성시 wr_12 를 체크한채로 작성한 후 수정하면 그제서야 wr_13, wr_14 는 안보일거고 wr_11, wr_7 이 뜰 것 같네요

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

회원로그인

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