게시판 리스트에서 특정회원이 작성한 글 검색
본문
안녕하세요.
게시판에서 특정 회원이 작성한 글을 입력해서 검색하는 것이 아니라 회원DB에서 리스트를 가지고 와서
검색하는 것을 만들고 있습니다. 그래서 DB에서 회원리스트를 가지고 온 다음 검색을 하려고 하는데
검색이 되지 않는데 어느부분이 잘못되었는지 확인해주시면 감사하겠습니다. ㅠㅠ
<form name="fsearch" method="get">
<input type="hidden" name="bo_table" value="<?php echo $bo_table ?>">
<input type="hidden" name="sca" value="<?php echo $sca ?>">
<input type="hidden" name="sop" value="and">
<table>
<tr>
<td>
<?php
function get_member_opt_view($fild, $mb_id)
{
global $g5;
$sql = " select * from $g5[member_table]";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++)
{
$str .= "<option value='$row[mb_id]'";
if ($row[mb_id] == $fild or $row[mb_id] == $mb_id) $str .= " selected";
$str .= ">$row[mb_id]($row[mb_name])</option>";
}
return $str;
}
?>
<select id="stx" name="stx" class="" >
<option value="">회원 선택</option>
<?php echo get_member_opt_view($fild, $mb_id) ?>
</select></td>
<td><button type="submit" value="검색" class="sch_btn"><i class="fa fa-search" aria-hidden="true"></i><span class="sound_only">검색</span></button></td>
</tr>
</table>
</form>
이렇게 하면 특정회원 이름으로 작성된 글만 검색이 되게큼 하고 싶은데... 뭐가 빠졌는지 검색이 안되네요.
input으로 그 회원이 아이디를 직접 입력을 하면 검색이 됩니다. 그리고 텍스트 필드 그 회원의 아이디도 남아있고요...
도움주시면 감사하겠습니다.
오늘도 좋은 하루 되세요.
!-->
답변을 작성하시기 전에 로그인 해주세요.