[PHP] 3단 셀렉트, 3단 select box
페이지 정보
작성자 관리자 작성일16-09-29 14:52 조회2,897회 댓글0건본문
<?php
echo $_POST['aa'];
echo $_POST['bb'];
echo $_POST['cc'];
?>
<form method="post">
<select name="aa">
<option value="년도">년도</option>
<option value="2016" <?php if ($_POST['aa']=="2016") echo 'selected="selected"';?>>2016</option>
<option value="2017" <?php if ($_POST['aa']=="2017") echo 'selected="selected"';?>>2017</option>
</select>
<select name="bb">
<option value="월">월</option>
<option value="1" <?php if ($_POST['bb']=="1") echo 'selected="selected"';?>>1</option>
<option value="2" <?php if ($_POST['bb']=="2") echo 'selected="selected"';?>>2</option>
<option value="3" <?php if ($_POST['bb']=="3") echo 'selected="selected"';?>>3</option>
</select>
<select name="cc">
<option value="일">일</option>
<option value="01" <?php if ($_POST['cc']=="01") echo 'selected="selected"';?>>01</option>
<option value="02" <?php if ($_POST['cc']=="02") echo 'selected="selected"';?>>02</option>
<option value="03" <?php if ($_POST['cc']=="03") echo 'selected="selected"';?>>03</option>
</select>
<input type='submit' value='조회'/>
</form>
간단한 기본 틀
echo $_POST['aa'];
echo $_POST['bb'];
echo $_POST['cc'];
?>
<form method="post">
<select name="aa">
<option value="년도">년도</option>
<option value="2016" <?php if ($_POST['aa']=="2016") echo 'selected="selected"';?>>2016</option>
<option value="2017" <?php if ($_POST['aa']=="2017") echo 'selected="selected"';?>>2017</option>
</select>
<select name="bb">
<option value="월">월</option>
<option value="1" <?php if ($_POST['bb']=="1") echo 'selected="selected"';?>>1</option>
<option value="2" <?php if ($_POST['bb']=="2") echo 'selected="selected"';?>>2</option>
<option value="3" <?php if ($_POST['bb']=="3") echo 'selected="selected"';?>>3</option>
</select>
<select name="cc">
<option value="일">일</option>
<option value="01" <?php if ($_POST['cc']=="01") echo 'selected="selected"';?>>01</option>
<option value="02" <?php if ($_POST['cc']=="02") echo 'selected="selected"';?>>02</option>
<option value="03" <?php if ($_POST['cc']=="03") echo 'selected="selected"';?>>03</option>
</select>
<input type='submit' value='조회'/>
</form>
간단한 기본 틀
댓글목록
등록된 댓글이 없습니다.