안녕하세요 폼관련 질문 드립니다.
본문
안녕하세요
폼을 현제 만들고 있는데요
글쓰기 에서는 정상적으로 선택이 되는데요
뷰페이지에서는 적용이 안됩니다.
이리저리 아무리 해 봐도 되지 않아서뭐가 잘못 되었는지 궁금 합니다.
여러개를 선택 하는 것이 아니라 한가지만 선택을 하는 라디오 버튼인데요
작은별님 사이트를 보고 하긴 했는데요
write.skin.php
// 후원종류
$wr1 = explode('|',$view['wr_16']);
$wr_16_1 = $wr16[1];
$wr_16_2 = $wr16[2];
$wr_16_3 = $wr16[3];
$wr_16_4 = $wr16[4];
<div class="req_box">
<div class="col-xs-12">
<div class="req_capt col-md-3"><font color="#0c4ca3">*</font> 후원종류</div>
<div class="req_inp req_inppd col-md-9">
<div>
<input type="radio" name="wr_16" id="wr_16_1" value="1" <?php echo ($write['wr_16_1'] == "1") ? " checked" : "";?> required /><label for="wr_16_1">일반후원</label>
<input type="radio" name="wr_16" id="wr_16_2" value="2" <?php echo ($write['wr_16_2'] == "2") ? " checked" : "";?> required /><label for="wr_16_2">결연후원</label>
<input type="radio" name="wr_16" id="wr_16_3" value="3" <?php echo ($write['wr_16_3'] == "3") ? " checked" : "";?> required /><label for="wr_16_3">물품후원</label>
<input type="radio" name="wr_16" id="wr_16_4" value="4" <?php echo ($write['wr_16_4'] == "4") ? " checked" : "";?> required /><label for="wr_16_4">기타</label>
</div>
</div>
</div>
</div>
view.skin.php
// 후원종류
$wr1 = explode('|',$view['wr_16']);
$wr_16_1 = $wr16[1];
$wr_16_2 = $wr16[2];
$wr_16_3 = $wr16[3];
$wr_16_4 = $wr16[4];
<div class="req_box">
<div class="col-xs-12">
<div class="req_capt col-md-3"><font color="#f47320">*</font> 후원종류</div>
<div class="req_inp req_inppd col-md-9">
<div>
<input type="radio" disabled name="wr_16" id="wr_16_1" value="1" <?php echo ($view['wr_16_1'] == "1") ? " checked" : "";?> required /><label for="wr_16_1">일반후원</label>
<input type="radio" disabled name="wr_16" id="wr_16_2" value="2" <?php echo ($view['wr_16_1'] == "2") ? " checked" : "";?> required /><label for="wr_16_2">결연후원</label>
<input type="radio" disabled name="wr_16" id="wr_16_3" value="3" <?php echo ($view['wr_16_1'] == "3") ? " checked" : "";?> required /><label for="wr_16_3">물품후원</label>
<input type="radio" disabled name="wr_16" id="wr_16_4" value="4" <?php echo ($view['wr_16_1'] == "4") ? " checked" : "";?> required /><label for="wr_16_4">기타</label>
</div>
</div>
</div>
</div>
답변 1
$view
[
'wr_16_1'
] ==
"1"
$view
[
'wr_16_2'
] ==
"1"
$view
[
'wr_16_3'
] ==
"1"
그리구요
view 스킨
$wr16 = explode('|',$view['wr_16']);
$wr_16_1 = $wr16[0];
$wr_16_2 = $wr16[1];
$wr_16_3 = $wr16[2];
$wr_16_4 = $wr16[3];
write 스킨
$wr16 = explode('|',$write['wr_16']);
$wr_16_1 = $wr16[0];
$wr_16_2 = $wr16[1];
$wr_16_3 = $wr16[2];
$wr_16_4 = $wr16[3];
답변을 작성하시기 전에 로그인 해주세요.