<? if($_POST['search']) { $search=$_POST['search']; } else { $search=array(); } $searchword = $_POST['searchword'] ?> <form method="post" action="" name="search_form"> <table align="center"> <tr> <td> 성명 <input type="checkbox" name="search[]" value="b_writer" <? if(in_array('b_writer',$search)){ echo 'checked="checked"';} ?>><br> 제목 <input type="checkbox" name="search[]" value="b_title" <? if(in_array('b_title',$search)){ echo 'checked="checked"';} ?>><br> 내용 <input type="checkbox" name="search[]" value="b_content" <? if(in_array('b_content',$search)){ echo 'checked="checked"';} ?>><br> </td> <td> <font size="3"><input type="text" name="searchword" value="<? echo $searchword; ?>" size="20" maxlength="15"></font> <font size="2" face="굴림"><input type="submit" value="검색"></font> </td> </tr> </table> </form>