그누보드 게시판 / 버튼 체크 시 원하는 내용 출력
본문
안녕하세요 ㅎㅎ
다름이 아니라~
게시판에 wr_2, wr_3을 (체크박스) 체크하면, 홈페이지, 앱 하고 출력이 되게 작업했습니다
write.skin.php
<input type="checkbox" name="wr_2" value="홈페이지" <?php echo get_checked($write['wr_2'], '홈페이지'); ?>>
<label for="wr_2" class="">홈페이지</label>
<input type="checkbox" name="wr_3" value="앱" <?php echo get_checked($write['wr_3'], '앱'); ?>>
<label for="wr_3" class="">앱</label>
그이후 list.skin.php에다가 체크를 하면, value값이 아니라 제가 원하는 내용을 출력 하고싶은데..
list.skin.php
<?php
if(isset($list[$i][wr_2])){
echo "<i class='fa fa-desktop' aria-hidden='true'></i>";
} else {
}
?>
<?php
if(isset($list[$i][wr_3])){
echo "<i class='fa fa-mobile' aria-hidden='true'></i>";
} else {
}
?>
이렇게 했더니 체크를 하나 안하나 상관없이 무조건 출력해버리네요..
다음과 같은 방식으로도 시도해봤지만 안됩니다 ㅠㅠ
list.skin.php
<?php
if($list[$i][wr_2]) == "홈페이지"){
echo "<i class='fa fa-desktop' aria-hidden='true'></i>";
}
?>
<?php
if($list[$i][wr_3]) == "앱"){
echo "<i class='fa fa-desktop' aria-hidden='true'></i>";
}
?>
방법이 있을까요..?
!-->!-->!-->
답변을 작성하시기 전에 로그인 해주세요.