날짜와 이름을 같이 검색
본문
<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">
<input type="hidden" name="sfl" value="wr_29"<?php echo get_selected($sfl, 'wr_29'); ?>>
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
~
<input type="text" name="stx2" value="<?php echo stripslashes($stx2) ?>" required id="stx2" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
<select name="sfl" id="sfl" class="frm_input" style="width:100px; margin-right:20px; height:32px">
<option value="'wr_name"<?php echo get_selected($sfl, 'wr_9'); ?>>고객명</option>
<option value="'wr_5"<?php echo get_selected($sfl, 'wr_5'); ?>>전화번호</option>
</select>
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" id="stx" class="frm_input" style="width:100px; height:32px">
<button type="submit" value="검색" class="sch_btn">검색</button>
</form>
개발자가 아니여서 헤메고 있습니다. (회사에 개발자가 없어요 ㅠㅠ)
name값 및 id값은 같이 쓰면 안되는걸 알고 있습니다.
기간검색과 selectbox 및 이름검색을 따로하면 검색이 잘 되는데 이걸 함께 붙여놓으니 검색이 안됩니다.
저걸 어떻게 풀어야 기간내에 이름을 검색할 수 있을까요?
!-->답변 3
https://sir.kr/qa/419785?stx=sql_search&sst=wr_num&unanswered=0&s_tag=
https://sir.kr/qa/419643?stx=sql_search&sst=wr_num&unanswered=0&s_tag=
참고하세요.
<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">
<input type="hidden" name="sfl" value="wr_29"<?php echo get_selected($sfl, 'wr_29'); ?>>
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
~
<input type="text" name="stx2" value="<?php echo stripslashes($stx2) ?>" required id="stx2" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
<select name="sfl" id="sfl" class="frm_input" style="width:100px; margin-right:20px; height:32px">
<option value="wr_name"<?php echo get_selected($sfl, 'wr_9'); ?>>고객명</option>
<option value="wr_5"<?php echo get_selected($sfl, 'wr_5'); ?>>전화번호</option>
<option value="wr_29"<?php echo get_selected($sfl, 'wr_29'); ?>>날짜</option>
</select>
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
~
<input type="text" name="stx2" value="<?php echo stripslashes($stx2) ?>" required id="stx2" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
<button type="submit" value="검색" class="sch_btn">검색</button>
</form>
<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">
<select name="sfl" id="sfl" class="frm_input" style="width:100px; margin-right:20px; height:32px">
<option value="wr_name"<?php echo get_selected($sfl, 'wr_9'); ?>>고객명</option>
<option value="wr_5"<?php echo get_selected($sfl, 'wr_5'); ?>>전화번호</option>
<option value="wr_29"<?php echo get_selected($sfl, 'wr_29'); ?>>날짜</option>
</select>
<input type="text" name="stx" value="<?php echo stripslashes($stx) ?>" required id="stx" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
~
<input type="text" name="stx2" value="<?php echo stripslashes($stx2) ?>" required id="stx2" class="frm_input redate" style="width:100px; height:32px" placeholder="날짜검색">
<button type="submit" value="검색" class="sch_btn">검색</button>
</form>
답변을 작성하시기 전에 로그인 해주세요.