PHP - ¿ÀÏ°ö°³¯ (1213)
°Ô½ÃÆÇ - °Ë»öÁ¶È¸
list.html - Ãß°¡¼Ò½º
<a href=write.html><!--img src=http://www.pcall.co.kr/img/88.gif border=0 width=70 height=50-->±Û¾²±â</a> <!--°Ë»öÁ¶È¸1213 *½ÃÀÛ--> <br><hr> <form method=post action=search.html> <select name=choice> <option value=name>À̸§ <option value=subject>Á¦¸ñ <option value=content>³»¿ë </select> <input type=text name=search> <input type=submit value=Àü¼Û> </form> <!--°Ë»öÁ¶È¸1213 *³¡--> </BODY>
<BODY>
<br> <? //ÆÄÀϸí: search.html echo choice --- $choice<br>; echo search --- $search<br>;
$query=select * from board1 ;//°ø¹é $endquery= order by num desc;// °ø¹é
if($choice ==
ame){ $fullquery=$query . where name=$search\ . $endquery; }else if($choice == subject) { $fullquery=$query . where subject like \%$search%\ . $endquery; }else if($choice == content) { $fullquery=$query . where content like \%$search%\ . $endquery; }
include connect.php;
$result=mysql_query($fullquery); ?> <font size=5 color=#ff0000>°Ë»öµÈ °Ô½Ã¹°</font> <table border=1 width=700> <tr> <td>¹øÈ£</td> <td>À̸§</td> <td>Á¦¸ñ</td> <td>µî·Ï³¯Â¥</td> <td>Á¶È¸¼ö</td> </tr> <? while($row=mysql_fetch_array($result)){ echo <tr> <td>$row[num]</td> <td>$row[name]</td> <td>$row[subject]</td> <td>$row[reg_date]</td> <td>$row[cnt]</td> </tr>; } ?> </table> </BODY>
php½ºÅ͵ð 2004 12 13
¼Ò½º¿¡·¯¾øÀÌ º¸±â
http://www.6VJ.com/php/php1213.txt
|