분류선택시에 레프트 인쿠르드
분류시에 인쿠르드를 어떻게 줘야되는지요
지금 자유게시판에 분류 3가지를 주구요
그럼 주소가 http://www.sir.co.kr/bbs/write.php?bo_table=g4_qa&sca=a
이런식으로 가잔아요
sca=a 일경우 레프트를 a.php
sca=b 일경우 레프트를 b.php
이런식으로 할려고하는데요
레프트에서
<? for ($i=0; $i<count($list); $i++) { ?>
<? $list[$i][ca_name];
if($list[$i][ca_name] == a){?>
<? include"../include/insur_left.php";?>
<?}else if($list[$i][ca_name] ==b){?>
<? include"../include/facil_left.php";?>
<?}else if($list[$i][ca_name] == c){?>
<? include"../include/edu_left.php";?>
<?}?>
<?}?>
이런식으로 하니까 글이있을경우는 나타나는데 글이 사라지면 레프트 부분도 같이 사라집니다
이거 어떻게 수정해야지 안없어지고 항상 나타나게 할수있을까요
지금 자유게시판에 분류 3가지를 주구요
그럼 주소가 http://www.sir.co.kr/bbs/write.php?bo_table=g4_qa&sca=a
이런식으로 가잔아요
sca=a 일경우 레프트를 a.php
sca=b 일경우 레프트를 b.php
이런식으로 할려고하는데요
레프트에서
<? for ($i=0; $i<count($list); $i++) { ?>
<? $list[$i][ca_name];
if($list[$i][ca_name] == a){?>
<? include"../include/insur_left.php";?>
<?}else if($list[$i][ca_name] ==b){?>
<? include"../include/facil_left.php";?>
<?}else if($list[$i][ca_name] == c){?>
<? include"../include/edu_left.php";?>
<?}?>
<?}?>
이런식으로 하니까 글이있을경우는 나타나는데 글이 사라지면 레프트 부분도 같이 사라집니다
이거 어떻게 수정해야지 안없어지고 항상 나타나게 할수있을까요
|
댓글을 작성하시려면 로그인이 필요합니다.
로그인
댓글 2개
if($_GET['sca'] == 'a')로 바꿔보세요.