list.skin.php 직접검색식 질문
본문
list.skin.php에서 아래와 같은 form input를 통해서 검색이 이루어 지는데요.
$bo_table, $sca, & wr_subject 를 form input이 아닌 직접검식으로 링크를 걸려고 합니다.
아래 GET 방식의 http://127.0.0.1/bbs/board.php?bo_table=BOARD&sca=&sop=and&sfl=wr_2&stx=%EC%9B%94%EA%B3%84 실제 URL은 이렇게 만들어지고 있습니다.
직접 검색식 방법으로 검색링크를 거는게 가능할까요?
URL방식이 안되면 SQL방식으로 가능할지...
관련검색을 해봤는데 지식이 짧아 윤곽을 못잡고 있습니다.
<fieldset id="bo_sch">
<legend>게시물 검색</legend>
<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">
<label for="sfl" class="sound_only">검색대상</label>
<select name="sfl">
<option value="wr_subject"<?php echo get_selected($sfl, 'wr_subject', true); ?>>제목</option>
<option value="wr_content"<?php echo get_selected($sfl, 'wr_content'); ?>>내용</option>
<option value="wr_subject||wr_content"<?php echo get_selected($sfl, 'wr_subject||wr_content'); ?>>제목+내용</option>
<option value="mb_id,1"<?php echo get_selected($sfl, 'mb_id,1'); ?>>회원아이디</option>
<option value="mb_id,0"<?php echo get_selected($sfl, 'mb_id,0'); ?>>회원아이디(코)</option>
<option value="wr_name,1"<?php echo get_selected($sfl, 'wr_name,1'); ?>>글쓴이</option>
<option value="wr_name,0"<?php echo get_selected($sfl, 'wr_name,0'); ?>>글쓴이(코)</option>
</select>
<input name="stx" value="<?php echo stripslashes($stx) ?>" placeholder="검색어(필수)" required id="stx" class="required frm_input" size="15" maxlength="20">
<input type="submit" value="검색" class="btn_submit">
</form>
</fieldset>
답변 1
직접검색이 무슨말인지 모르겠는데 a링크에 href 같이 주소로 직접 검색을 말씀하시는 건가요?
get방식처럼?
그럼 그 get 주소형태를 직접 만들어서 a링크에 넣어주시면 됩니다.
답변을 작성하시기 전에 로그인 해주세요.