À̹ø ½Ã°£ºÎÅÍ´Â ±Û ³»¿ë º¸±â ÇÁ·Î±×·¥À» ¼³¸íÇÕ´Ï´Ù.
Áö³ ½Ã°£±îÁö ±ÛÀ» ¾²°í(write.php, insert.php), ±Û ¸ñ·ÏÀ» È®ÀÎÇÏ´Â(list.php)
±â´É±îÁö ±¸ÇöÇß½À´Ï´Ù.
À̹ø ½Ã°£¿¡´Â ±Û ¸ñ·Ï¿¡¼ ÇØ´ç ±ÛÀ» Ŭ¸¯ÇßÀ» ¶§ ±Û
³»¿ëÀ» º¸¿© ÁÖ´Â ÇÁ·Î±×·¥(view.php)À» ¸¸µì´Ï´Ù.
¿ì¼± ±Û ¸ñ·Ï º¸±â¿¡¼ ±Û Á¦¸ñÀ» Ŭ¸¯ÇßÀ» ¶§ ±Û ³»¿ëÀ» º¸¿©ÁÖ±â À§Çؼ´Â,
Áö³ ½Ã°£±îÁö ½Ç½ÀÇß´ø list.php ¼Ò½º¿¡¼ ´ÙÀ½°ú °°ÀÌ ÇÑ ÁÙÀ» ¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù.
list.phpÀÇ 73ÇàÀÇ $array[subject]¸¦,
<a href='view.php?page=$page&number=$array[number]'>$array[subject]</a>
¿Í °°ÀÌ ¼öÁ¤ÇØ¾ß ÇÕ´Ï´Ù.
±Û Á¦¸ñÀ» Ŭ¸¯Çϸé, view.php·Î À̵¿ÇÏ¸é¼ ÇöÀç ¸ñ·Ï º¸±âÀÇ ÆäÀÌÁö ¹øÈ£¿Í
ÇØ´ç ±ÛÀÇ ±Û ¹øÈ£¸¦ °¡Á®°¡°Ô µÇ´Â °Ì´Ï´Ù.
±Û ¹øÈ£´Â ÇØ´ç ±ÛÀ» Á¶È¸Çϱâ À§ÇØ
ÇÊ¿äÇÑ °ÍÀÌ°í, ÆäÀÌÁö ¹øÈ£´Â ±Û ³»¿ë º¸±â ȸ鿡¼ ´Ù½Ã [¸ñ·Ï] ¹öÆ°À» ´·¶À»
¶§ ÆäÀÌÁö°¡ ¼ÓÇÑ ¸ñ·ÏÀ» º¸¿©ÁÖ±â À§ÇØ °¡Á®°¡´Â °ÍÀÔ´Ï´Ù.(view.php¸¦ º¸´Ù°¡ º¸¸é
ÀúÀý·Î ÀÌÇØ°¡ µÉ °Ì´Ï´Ù.)
±×·³, ÀÌÁ¦ºÎÅÍ view.php¸¦ ¸¸µé¾î º¾½Ã´Ù.
¿ì¼± µðÀÚÀκÎÅÍ ÇØ¾ß °ÚÁÒ.
À¥ ¿¡µðÅ͸¦ »ç¿ëÇÏ¿© ´ÙÀ½°ú °°ÀÌ µðÀÚÀÎÇØ º¾½Ã´Ù.
±×·¯¸é ¾Æ·¡¿Í °°Àº ¼Ò½º°¡ ¸¸µé¾îÁö°ÚÁÒ... ¿¡µðÅÍ¿¡ µû¶ó Á¶±Ý¾¿ ´Ù¸£°ÚÁö¸¸.
- <html>
- <head>
- <title>PHP °Ô½ÃÆÇ ÇÁ·ÎÁ§Æ® - º¸±â</title>
- <STYLE TYPE="text/css">
- BODY,TD,SELECT,input,DIV,form,TEXTAREA,center,option,pre,blockquote
{font-family:±¼¸²;font-size:9pt;color:#555555;}
- A:link {color:black;text-decoration:none;}
- A:visited {color:black;text-decoration:none;}
- A:active {color:black;text-decoration:none;}
- A:hover {color:gray;text-decoration:none;}
- </STYLE>
- </head>
- <body bgcolor=white background=./images/body_bg.gif>
- <img src=./images/maintitle.gif>
- <table border=0 cellspacing=1 cellpadding="3" width=670>
- <tr>
- <td align=center>
- <font color=green><b>³»¿ë
º¸±â ȸéÀÔ´Ï´Ù.</b></font>
- </td>
- </tr>
- <tr>
- <td bgcolor="#EAC3EA">
- <table border=0 cellspacing=1 cellpadding=0 width=670 bgcolor="white">
- <tr>
- <td width="100">
- <p
align="right"><b>À̸§ </b></p>
-
- </td>
- <td width="400">
- <p> </p>
- </td>
- <td width="100">
- <p
align="right"><b>Á¶È¸¼ö </b></p>
- </td>
- <td>
- <p> </p>
- </td>
- </tr>
- <tr>
- <td width="100">
- <p
align="right"><b>ÀüÀÚ¿ìÆí </b></p>
- </td>
- <td colspan="3">
- <p> </p>
- </td>
- </tr>
- <tr>
- <td width="100">
- <p
align="right"><b>ȨÆäÀÌÁö </b></p>
- </td>
- <td colspan="3">
- <p> </p>
- </td>
- </tr>
- <tr>
- <td width="100">
- <p
align="right"><b>Á¦¸ñ </b></p>
- </td>
- <td colspan="3">
- <p> </p>
- </td>
- </tr>
- <tr>
- <td width="100">
- <p
align="right"><b>³»¿ë </b></p>
- </td>
- <td colspan="3">
- <p> </p>
- </td>
- </tr>
- </table>
- <p
align="center">[¸ñ·Ï] [¾²±â] [¼öÁ¤] [»èÁ¦]</p>
- </td>
- </tr>
- </table>
- </body>
- </html>
´ÙÀ½ ½Ã°£ºÎÅÍ´Â À§ ¼Ò½º¿¡ ½ÇÁ¦ ÇÁ·Î±×·¥À» ÀÔÈ÷´Â ÀÛ¾÷À» Çغ¸°Ú½À´Ï´Ù.
ÀÌ»ó, µ¿Á־ƺü ¼Õº´¸ñÀ̾ú½À´Ï´Ù.