{"id":5287,"date":"2002-11-24T02:50:20","date_gmt":"2002-11-23T17:50:20","guid":{"rendered":"https:\/\/sonlab.mycafe24.com\/wp\/%ea%b2%8c%ec%8b%9c%ed%8c%90-%ea%b8%80-%eb%82%b4%ec%9a%a9-%eb%b3%b4%ea%b8%b0-%ea%b8%b0%eb%8a%a53-view-php-%ec%84%a4%eb%aa%85\/"},"modified":"2002-11-24T02:50:20","modified_gmt":"2002-11-23T17:50:20","slug":"%ea%b2%8c%ec%8b%9c%ed%8c%90-%ea%b8%80-%eb%82%b4%ec%9a%a9-%eb%b3%b4%ea%b8%b0-%ea%b8%b0%eb%8a%a53-view-php-%ec%84%a4%eb%aa%85","status":"publish","type":"post","link":"http:\/\/sonbm.com\/wp\/%ea%b2%8c%ec%8b%9c%ed%8c%90-%ea%b8%80-%eb%82%b4%ec%9a%a9-%eb%b3%b4%ea%b8%b0-%ea%b8%b0%eb%8a%a53-view-php-%ec%84%a4%eb%aa%85\/","title":{"rendered":"\uac8c\uc2dc\ud310 \uae00 \ub0b4\uc6a9 \ubcf4\uae30 \uae30\ub2a5(3) view.php \uc124\uba85"},"content":{"rendered":"<p>\ube44\uad50\uc801 \ubcf5\uc7a1\ud55c \ubaa9\ub85d \ubcf4\uae30\ub97c \uc774\ubbf8 \uc2e4\uc2b5\ud55c \uc0c1\ud0dc\uc774\uae30 \ub54c\ubb38\uc5d0 \uae00 \ub0b4\uc6a9 \ubcf4\uae30 \uc18c\uc2a4\ub294<br \/>\n\ud55c\uacb0 \uc27d\uac8c \uc774\ud574\uac00 \ub420 \uac81\ub2c8\ub2e4.<\/p>\n<ol type=\"1\">\n<li value=\"9\"><font color=\"green\">\/\/\ud14c\uc774\ube14\uc5d0\uc11c \uae00\uc744 \uac00\uc838\uc635\ub2c8\ub2e4. <\/font><\/li>\n<li>$query = &quot;<font color=\"blue\">select * from $tablename where number=&#8217;$number<\/font>&#8216;&quot;;<br \/>\n    \/\/ \uae00 \ubc88\ud638\ub97c \uac00\uc9c0\uace0 \uc870\ud68c\ub97c \ud569\ub2c8\ub2e4.<\/li>\n<li>$result = mysql_query($query) or die (mysql_error());<\/li>\n<li>$array = mysql_fetch_array($result);<\/li>\n<\/ol>\n<p>10\ud589\uc758 SQL \ubb38\uc5d0\uc11c \uc911\uc694\ud55c \uac83\uc740 <font color=\"blue\">where number=&#8217;$number<\/font>&#8216;\uc785\ub2c8\ub2e4.<br \/>\ubaa9\ub85d<br \/>\n\ubcf4\uae30\uc5d0\uc11c \ud574\ub2f9 \uae00 \uc81c\ubaa9\uc744 \ud074\ub9ad\ud588\uc744 \ub54c, \ud604\uc7ac\uc758 list.php\uac00 \uc2e4\ud589\ub418\ub2c8\ub2e4. <br \/>\uc774 \ub54c<br \/>\n\uae00 \ubc88\ud638\uc640 \ud398\uc774\uc9c0 \ubc88\ud638\ub97c \ud568\uaed8 \ub118\uc5b4\uc654\uc2b5\ub2c8\ub2e4.(\uae08\uc2dc\ucd08\ubb38\uc774\ub77c\uad6c\uc694? \uadf8\ub7fc \ubc14\ub85c \uc804 \uac15\uc88c\ub97c<br \/>\n\ub2e4\uc2dc \ubcf4\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.)<br \/>\uae00 \ubc88\ud638\ub97c \uc0ac\uc6a9\ud558\uc5ec \uae00 \ubc88\ud638\uc5d0 \ud574\ub2f9\ub418\ub294 \ub808\ucf54\ub4dc\ub97c \ubd88\ub7ec\uc624\ub294<br \/>\nSQL \ucffc\ub9ac\ubb38\uc785\ub2c8\ub2e4.<br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<ol type=\"1\">\n<li value=\"14\"><font color=\"green\">\/\/\ubc31\uc2ac\ub798\uc26c \uc81c\uac70, \ud2b9\uc218\ubb38\uc790 \ubcc0\ud658(HTML\uc6a9), \uac1c\ud589(&lt;br&gt;)\ucc98\ub9ac \ub4f1<\/font><\/li>\n<li><font color=\"blue\">$array[name] = stripslashes($array[name]);<\/font><\/li>\n<li>$array[subject] = stripslashes($array[subject]);<\/li>\n<li>$array[memo] = stripslashes($array[memo]);<\/li>\n<\/ol>\n<p>\uc608\uc804\uc5d0 \uae00 \uc785\ub825 \ubd80\ubd84 \uc2e4\uc2b5\ud560 \ub54c,<br \/><b>$name = addslashes($name);<br \/><\/b>\uc774\ub807\uac8c<br \/>\n\ud588\uc2b5\ub2c8\ub2e4. (\uc790\uc138\ud55c \uc124\uba85\uc740&nbsp;&#8216;<a href=\"http:\/\/www.itmembers.net\/board\/view.php?id=php&#038;no=17\" target=\"_blank\"><b>\uc785\ub825\ud55c<br \/>\n\uae00 DB\uc5d0 \uc800\uc7a5\ud558\uae30(2)<\/b><\/a>&#8216; \uac15\uc88c\ub97c \ucc38\uc870\ud558\uc138\uc694)<\/p>\n<p>\uc785\ub825\ud560 \ub54c \uc778\uc6a9\ubd80\ud638, \uc5ed\uc2ac\ub798\uc2dc \ub4f1\uc5d0 \uc5ed\uc2ac\ub798\uc2dc \uae30\ud638\ub97c \ucca8\uac00\ud558\uc5ec \uc800\uc7a5\ud558\uc600\uc2b5\ub2c8\ub2e4.<br \/>\uc704<br \/>\n15\ud589\ubd80\ud130\ub294, \uadf8\ub807\uac8c \uc800\uc7a5\ub41c \ubb38\uc790\uc5f4\uc744 \ub2e4\uc2dc \ubd88\ub7ec\ub0bc \ub54c \uc5ed\uc2ac\ub798\uc2dc \uae30\ud638\ub97c \uc81c\uac70\ud558\uace0 \uc800\uc7a5\ud558\ub294<br \/>\n\uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4.<br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<ol type=\"1\">\n<li value=\"19\"><font color=\"blue\">$array[subject] = htmlspecialchars($array[subject]);<\/font><\/li>\n<li>$array[memo] = htmlspecialchars($array[memo]);<\/li>\n<\/ol>\n<p>19~20\ud589\uc740 \ubb38\uc790\uc5f4 \uc911\uc5d0\uc11c \ud2b9\uc218 \ubb38\uc790\ub97c HTML\ub85c \ud45c\ud604\ud558\uae30 \uc704\ud55c HTML \ubb38\uc790\ub85c \uce58\ud658\ud558\ub294<br \/>\n\uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4.<br \/>\uc608\ub97c \ub4e4\uc5b4, <b>&lt;<\/b> \ub294 <b>&amp;lt;<\/b> \ub85c, <b>&gt;<\/b><br \/>\n\ub294 <b>&amp;gt;<\/b> \ub85c, \uc791\uc740 \ub530\uc634\ud45c\uc778 <b>&#8216; <\/b>\ub294 <b>&amp;quot;<\/b> \ub85c \ubc14\uafc9\ub2c8\ub2e4.<br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<ol type=\"1\">\n<li value=\"22\"><font color=\"blue\">$array[memo] = nl2br($array[memo]);<\/font><\/li>\n<\/ol>\n<p>22\ud589\uc740 \ubb38\uc790\uc5f4 \uc911\uc5d0\uc11c \uc5d4\ud130 \ud0a4\uac00 \uc785\ub825\ub41c \ubd80\ubd84\uc744 <b>&lt;br&gt;<\/b> \ubb38\uc790\ub85c \ubc14\uafb8\ub294<br \/>\n\uc5ed\ud560\uc744 \ud569\ub2c8\ub2e4. \uadf8\ub798\uc57c \uc6f9 \uc0c1\uc5d0\uc11c \uc81c\ub300\ub85c \ubcf4\uc774\ub2c8\uae4c\uc694.<\/p>\n<p>\uc774\ub807\uac8c 9\ud589\ubd80\ud130 22\ud589\uae4c\uc9c0\ub294, \uac8c\uc2dc\ud310 \ud504\ub85c\uadf8\ub7a8\uc5d0\uc11c \uae00\uc744 \ubcf4\uc5ec\uc8fc\ub294 \ubd80\ubd84\uc5d0\uc11c \uaf2d<br \/>\n\ud544\uc694\ud55c \uae30\ub2a5\ub4e4\uc785\ub2c8\ub2e4. <br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<ol type=\"1\">\n<li value=\"24\"><font color=\"green\">\/\/ \uc870\ud68c\uc218 \uce74\uc6b4\ud130 \uc99d\uac00<\/font><\/li>\n<li>$query = &quot;<font color=\"blue\">update $tablename set count = count + 1 where number=&#8217;$number<\/font>&#8216;&quot;;<\/li>\n<li>mysql_query($query);<\/li>\n<\/ol>\n<p>25\ud589\uc740 \ud604\uc7ac\uc758 count \ud544\ub4dc\uc758 \uac12\uc5d0 1\uc744 \ub354\ud558\ub294 \ucffc\ub9ac\ubb38\uc785\ub2c8\ub2e4. <br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<ol type=\"1\">\n<li value=\"58\">&lt;p&gt;<font color=\"blue\">&lt;?<br \/>\n    echo $array[name]; ?&gt;<\/font>&lt;\/p&gt;<\/li>\n<\/ol>\n<p>58\ud589\uc740 \uc124\uba85 \uc548\ud574\ub3c4 \ub418\uc8e0? \uc774\ub984\uc744 \ucd9c\ub825\ud569\ub2c8\ub2e4. 64, 72, 80, 88, 96\ud589\ub3c4 \ub9c8\ucc2c\uac00\uc9c0\uc785\ub2c8\ub2e4.<br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<ol type=\"1\">\n<li value=\"100\">&lt;p<br \/>\n    align=&quot;center&quot;&gt;<font color=\"blue\">&lt;a href=&quot;list.php?page=&lt;? echo $page;<br \/>\n    ?&gt;&quot;&gt;<\/font>[\ubaa9\ub85d]<font color=\"blue\">&lt;\/a&gt;<\/font> &amp;nbsp;&lt;a href=&quot;write.php&quot;&gt;[\uc4f0\uae30]&lt;\/a&gt;<br \/>\n    &amp;nbsp;&lt;a href=&quot;modify.php?number=&lt;? echo $number; ?&gt;&amp;page=&lt;?<br \/>\n    echo $page; ?&gt;&quot;&gt;[\uc218\uc815]&lt;\/a&gt; &amp;nbsp;&lt;a href=&quot;delete.php?number=&lt;?<br \/>\n    echo $number; ?&gt;&amp;page=&lt;? echo $page; ?&gt;&quot;&gt;[\uc0ad\uc81c]&lt;\/a&gt;&lt;\/p&gt;<\/li>\n<\/ol>\n<p>\ub9c8\uc9c0\ub9c9\uc73c\ub85c 100\ud589\uc744 \ubcf4\uba74,<br \/>[\ubaa9\ub85d]\uc744 \ud074\ub9ad\ud588\uc744 \ub54c list.php \ud398\uc774\uc9c0\ub85c \uc774\ub3d9\ud558\uba74\uc11c<br \/>\n\ud604\uc7ac\uc758 \ud398\uc774\uc9c0 \ubc88\ud638\ub3c4 \ud568\uaed8 \uac00\uc838\uac00\ub294 \uac83\uc744 \uc54c \uc218 \uc788\uc2b5\ub2c8\ub2e4.<br \/>[\uc218\uc815],[\uc0ad\uc81c]\ub97c \ud074\ub9ad\ud558\uba74<br \/>\n\ud604\uc7ac \uae00 \ubc88\ud638\uc640 \ud398\uc774\uc9c0 \ubc88\ud638\ub97c \ud568\uaed8 \uac00\uc838\uac11\ub2c8\ub2e4. \uc218\uc815\uacfc \uc0ad\uc81c\ub97c \uc704\ud55c modify.php,<br \/>\ndelete.php \ub4f1\uc740 \uc544\uc9c1 \uc548 \ub9cc\ub4e4\uc5c8\uc73c\ub2c8 \uc774\uac78 \ud074\ub9ad\ud558\uba74 \ub2f9\uc5f0\ud788 \uc624\ub958\uac00 \ub098\uaca0\uc8e0&#8230;<br \/><img decoding=\"async\" src=\"http:\/\/www.itmembers.net\/images\/bar01.gif\">\n<\/p>\n<p>\uc624\ub79c\ub9cc\uc5d0 \uba87 \uac1c\uc758 \uac15\uc88c\ub97c \ud55c\uaebc\ubc88\uc5d0 \uc62c\ub9ac\ub290\ub77c \uc2dc\uac04 \uac00\ub294 \uc904 \ubab0\ub790\uc2b5\ub2c8\ub2e4.<br \/>\uc774\uc81c<br \/>\n\uc2ac\uc2ac \uc878\ub9ac\ub124\uc694. <br \/>\uc774\uc0c1, \ub3d9\uc8fc\uc544\ube60 \uc190\ubcd1\ubaa9\uc774\uc5c8\uc2b5\ub2c8\ub2e4.<br \/><img src=http:\/\/www.itmembers.net\/images\/itmemberslogo5.gif><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ube44\uad50\uc801 \ubcf5\uc7a1\ud55c \ubaa9\ub85d \ubcf4\uae30\ub97c \uc774\ubbf8 \uc2e4\uc2b5\ud55c \uc0c1\ud0dc\uc774\uae30 \ub54c\ubb38\uc5d0 \uae00 \ub0b4\uc6a9 \ubcf4\uae30 \uc18c\uc2a4\ub294 \ud55c\uacb0 \uc27d\uac8c \uc774\ud574\uac00 \ub420 \uac81\ub2c8\ub2e4. \/\/\ud14c\uc774\ube14\uc5d0\uc11c \uae00\uc744 \uac00\uc838\uc635\ub2c8\ub2e4. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[77],"tags":[78,79,80,81,28,82],"class_list":["post-5287","post","type-post","status-publish","format-standard","hentry","category-php1","tag-it","tag-php","tag-80","tag-81","tag-28","tag-82"],"_links":{"self":[{"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/posts\/5287","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/comments?post=5287"}],"version-history":[{"count":0,"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/posts\/5287\/revisions"}],"wp:attachment":[{"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/media?parent=5287"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/categories?post=5287"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/sonbm.com\/wp\/wp-json\/wp\/v2\/tags?post=5287"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}