메인쪽에서 미니 검색창을 통에서 특정 게시판 검색하려고합니다.
<form name='frmsearch1' id="frmsearch1" style='margin:0px;' onsubmit='return search_submit(this);'>
<input type='hidden' name='sfl' value='wr_subject||wr_content' />
<input type='hidden' name='sop' value='and' />
<input type='hidden' name='stx' value='' /></td>
<select name='search_flag' id='search_flag' class='small' style="width:80px;">
<option value='강좌명'>강좌명</option>
<option value='강사명'>강사명</option>
</select>
<input name="search_str" type="text" class='ed' value='<?=stripslashes(get_text($search_str))?>' size="20" />
<input name="image" type="image" src='/images/search.gif' align="absmiddle" border="0" /></form>
<script>
function search_submit(f) {
if (f.search_flag.value == '검색') {
f.action = '<?=$g4[path]?>/search.php';
} else {
f.stx.value = f.search_str.value;
f.action = '<?=$g4[path]?>/search.php';
}
}
<?
if ($search_flag) {
echo "document.getElementById('search_flag').value = '$search_flag';";
}
?>
</script>
/bbs/board.php?bo_table=31&sca=&sfl=wr_subject&stx=검색단어
검색테이블은 wr_1 과 wr_2 를 골라서 검색한다고 가능하에...
이런식으로 링크를 보내려고합니다..
고수님들 많은 도움부탁드립니다.
<form name='frmsearch1' id="frmsearch1" style='margin:0px;' onsubmit='return search_submit(this);'>
<input type='hidden' name='sfl' value='wr_subject||wr_content' />
<input type='hidden' name='sop' value='and' />
<input type='hidden' name='stx' value='' /></td>
<select name='search_flag' id='search_flag' class='small' style="width:80px;">
<option value='강좌명'>강좌명</option>
<option value='강사명'>강사명</option>
</select>
<input name="search_str" type="text" class='ed' value='<?=stripslashes(get_text($search_str))?>' size="20" />
<input name="image" type="image" src='/images/search.gif' align="absmiddle" border="0" /></form>
<script>
function search_submit(f) {
if (f.search_flag.value == '검색') {
f.action = '<?=$g4[path]?>/search.php';
} else {
f.stx.value = f.search_str.value;
f.action = '<?=$g4[path]?>/search.php';
}
}
<?
if ($search_flag) {
echo "document.getElementById('search_flag').value = '$search_flag';";
}
?>
</script>
/bbs/board.php?bo_table=31&sca=&sfl=wr_subject&stx=검색단어
검색테이블은 wr_1 과 wr_2 를 골라서 검색한다고 가능하에...
이런식으로 링크를 보내려고합니다..
고수님들 많은 도움부탁드립니다.
댓글 3개
<form name='frmsearch1' id="frmsearch1" style='margin:0px;' action = '<?=$g4[path]?>/bbs/board.php'>
<input type='hidden' name='bo_table' value='31' />
<input type='hidden' name='sca' value='' />
<input type='hidden' name='sop' value='and' />
<select name='sfl' id='sfl' style="width:80px;">
<option value='wr_1'>강좌명</option>
<option value='wr_2'>강사명</option>
</select>
<input name="stx" type="text" value='<?=stripslashes(get_text($stx))?>' size="20" />
<input name="image" type="image" src='/images/search.gif' align="absmiddle" border="0" />
</form>
<input type='hidden' name='bo_table' value='31' />
<input type='hidden' name='sca' value='' />
<input type='hidden' name='sop' value='and' />
<select name='sfl' id='sfl' style="width:80px;">
<option value='wr_1'>강좌명</option>
<option value='wr_2'>강사명</option>
</select>
<input name="stx" type="text" value='<?=stripslashes(get_text($stx))?>' size="20" />
<input name="image" type="image" src='/images/search.gif' align="absmiddle" border="0" />
</form>
게시글 목록
| 번호 | 제목 |
|---|---|
| 284508 | |
| 284499 | |
| 284492 | |
| 284490 | |
| 284484 | |
| 284481 | |
| 284478 | |
| 284476 | |
| 284474 | |
| 284472 | |
| 284470 | |
| 284458 | |
| 284457 | |
| 284454 | |
| 284453 | |
| 284447 | |
| 284446 | |
| 284444 | |
| 284441 | |
| 284440 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기