{"id":609,"date":"2020-05-23T11:26:02","date_gmt":"2020-05-23T08:26:02","guid":{"rendered":"https:\/\/ek.oa.edu.ua\/Kukhta\/test3\/?p=609"},"modified":"2020-05-23T11:26:02","modified_gmt":"2020-05-23T08:26:02","slug":"otrymuiemo-dani-vid-elementiv-formy","status":"publish","type":"post","link":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/otrymuiemo-dani-vid-elementiv-formy\/","title":{"rendered":"\u041e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0434\u0430\u043d\u0456 \u0432\u0456\u0434 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0456\u0432 \u0444\u043e\u0440\u043c\u0438"},"content":{"rendered":"<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u0443\u0440\u043e\u0446\u0456 \u043c\u0438 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0444\u0443\u043d\u043a\u0446\u0456\u0439 PHP \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u043c\u043e \u0434\u0430\u043d\u0456, \u044f\u043a\u0456 \u0431\u0443\u0434\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447 \u0443 \u0444\u043e\u0440\u043c\u0443.<\/p>\n<p>\u041f\u0435\u0440\u0448\u0435, \u0449\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e &#8211; \u0446\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0444\u043e\u0440\u043c\u0443:<\/p>\n<pre class=\"prettyprint linenums\">&lt;<span class=\"hljs-title\">form<\/span> <span class=\"hljs-attribute\">action<\/span>=<span class=\"hljs-value\">\"app\/check.php\"<\/span> <span class=\"hljs-attribute\">method<\/span>=<span class=\"hljs-value\">\"post\"<\/span>&gt;\r\n\r\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">p<\/span>&gt;\u0406<\/span>\u043c'\u044f: <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">input<\/span> <span class=\"hljs-attribute\">name<\/span>=<span class=\"hljs-value\">\"name\"<\/span> <span class=\"hljs-attribute\">type<\/span>=<span class=\"hljs-value\">\"text\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">p<\/span>&gt;<\/span>\r\n\r\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">p<\/span>&gt;<\/span>\u0424\u0430\u043c\u0456\u043b\u0456\u044f: <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">input<\/span> <span class=\"hljs-attribute\">name<\/span>=<span class=\"hljs-value\">\"surname\"<\/span> <span class=\"hljs-attribute\">type<\/span>=<span class=\"hljs-value\">\"text\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">p<\/span>&gt;<\/span>\r\n\r\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">p<\/span>&gt;<\/span>E-mail: <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">input<\/span> <span class=\"hljs-attribute\">name<\/span>=<span class=\"hljs-value\">\"email\"<\/span> <span class=\"hljs-attribute\">type<\/span>=<span class=\"hljs-value\">\"text\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">p<\/span>&gt;<\/span>\r\n\r\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">p<\/span>&gt;\u041f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f<\/span>: <span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">br<\/span> \/&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">textarea<\/span> <span class=\"hljs-attribute\">name<\/span>=<span class=\"hljs-value\">\"message\"<\/span> <span class=\"hljs-attribute\">cols<\/span>=<span class=\"hljs-value\">\"30\"<\/span> <span class=\"hljs-attribute\">rows<\/span>=<span class=\"hljs-value\">\"5\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">textarea<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">p<\/span>&gt;<\/span>\r\n\r\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">p<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;<span class=\"hljs-title\">input<\/span> <span class=\"hljs-attribute\">type<\/span>=<span class=\"hljs-value\">'submit'<\/span> <span class=\"hljs-attribute\">value<\/span>=<span class=\"hljs-value\">'\u0412\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u0438'<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-title\">p<\/span>&gt;<\/span>\r\n\r\n&lt;\/<span class=\"hljs-title\">form<\/span>&gt;<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-610\" src=\"https:\/\/ek.oa.edu.ua\/Kukhta\/test3\/wp-content\/uploads\/2020\/05\/screenshot_1-300x188.png\" alt=\"\" width=\"345\" height=\"216\" srcset=\"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-content\/uploads\/2020\/05\/screenshot_1-300x188.png 300w, https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-content\/uploads\/2020\/05\/screenshot_1.png 600w\" sizes=\"auto, (max-width: 345px) 100vw, 345px\" \/><\/p>\n<p>\u0417\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0443\u0432\u0430\u0433\u0443 \u043d\u0430 \u0440\u044f\u0434\u043e\u043a <strong>action= &#8220;app\/check.php<\/strong>&#8221; &#8211; \u0426\u0435 \u0430\u0434\u0440\u0435\u0441 \u043e\u0431\u0440\u043e\u0431\u043d\u0438\u043a\u0430 \u0444\u043e\u0440\u043c\u0438, \u0441\u044e\u0434\u0438 \u0431\u0443\u0434\u0443\u0442\u044c \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u0438\u0441\u044f \u0434\u0430\u043d\u0456 \u0444\u043e\u0440\u043c\u0438, \u043f\u0456\u0441\u043b\u044f \u043d\u0430\u0442\u0438\u0441\u043a\u0430\u043d\u043d\u044f \u043a\u043d\u043e\u043f\u043a\u0438 \u0412\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u0438. \u0422\u0430\u043a\u043e\u0436, \u043d\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <strong>name<\/strong> \u0443 \u043f\u043e\u043b\u0456\u0432 \u0444\u043e\u0440\u043c\u0438, \u043c\u0438 \u0431\u0443\u0434\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0446\u0456 \u0456\u043c\u0435\u043d\u0430 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u0456 \u043a\u043e\u0434\u0443. \u041f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0431\u0443\u0434\u0435\u043c\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u043c &#8211; POST.<\/p>\n<p>1. \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u0447\u043d\u0435\u043c\u043e. \u0421\u0442\u0432\u043e\u0440\u0456\u0442\u044c \u0456 \u0432\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 (\u0447\u0435\u0440\u0435\u0437 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440) \u043e\u0431\u0440\u043e\u0431\u043d\u0438\u043a app\/code.php &#8211; \u0441\u043f\u043e\u0447\u0430\u0442\u043a\u0443, \u0446\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0440\u043e\u0436\u043d\u044f \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0430. \u0414\u0430\u043b\u0456 \u0432\u0456\u0434\u043a\u0440\u0438\u0439\u0442\u0435 \u0442\u0435\u0433 PHP &#8211; <strong>&lt;?php<\/strong>.<\/p>\n<p>2. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u0438\u0442\u0438, \u0447\u0438 \u0431\u0443\u043b\u0430 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u0444\u043e\u0440\u043c\u0430, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u043c\u0438 \u0431\u0443\u0434\u0435\u043c\u043e \u0432\u0438\u043a\u043e\u0440\u0438\u0441\u0442\u043e\u0432\u0443\u0432\u0430\u0442\u0438 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u0443 \u0437\u043c\u0456\u043d\u043d\u0443 <code>$_SERVER<\/code> \u0456 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u044f\u0442\u0438 <code>REQUEST_METHOD<\/code><\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\nif($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n\u00a0 \u00a0 \u00a0\/\/ \u043d\u0430\u0448 \u043a\u043e\u0434\r\n}\r\n?&gt;<\/pre>\n<p>3. \u0414\u0430\u043b\u0456, \u044f\u043a\u0449\u043e \u0444\u043e\u0440\u043c\u0430 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430, \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0432\u0456\u0434 \u043f\u043e\u043b\u044f &#8220;\u0406\u043c&#8217;\u044f&#8221;, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e, \u044f\u043a\u0456\u0439-\u043d\u0435\u0431\u0443\u0434\u044c \u0437\u043c\u0456\u043d\u043d\u0456\u0439 \u043f\u0440\u0438\u0441\u0432\u043e\u044e\u0454\u043c\u043e \u043e\u0442\u0440\u0438\u043c\u0430\u043d\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044f \u0432\u0456\u0434 \u0446\u044c\u043e\u0433\u043e \u043f\u043e\u043b\u044f, \u043d\u0430\u043f\u0440\u0438\u043a\u043b\u0430\u0434:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n$name = $_POST['name']; \r\n?&gt;<\/pre>\n<p><code>$_POST<\/code> &#8211; \u0437\u043c\u0456\u043d\u043d\u0430, \u0432 \u044f\u043a\u0456\u0439 \u0437\u0431\u0435\u0440\u0456\u0433\u0430\u044e\u0442\u044c\u0441\u044f \u0434\u0430\u043d\u0456, \u044f\u043a\u0449\u043e \u0444\u043e\u0440\u043c\u0430 \u0431\u0443\u043b\u0430 \u0432\u0456\u0434\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0430 \u043c\u0435\u0442\u043e\u0434\u043e\u043c POST.<\/p>\n<p><code>$_POST ['name']<\/code> &#8211; \u043e\u0442\u0440\u0438\u043c\u0443\u0454\u043c\u043e \u0434\u0430\u043d\u0456 \u0432\u0456\u0434 \u043f\u043e\u043b\u044f name.<\/p>\n<p>4. \u0422\u0435\u0436 \u0441\u0430\u043c\u0435 \u0440\u043e\u0431\u0438\u043c\u043e \u0456 \u0434\u043b\u044f \u0456\u043d\u0448\u0438\u0445 \u043d\u0430\u0448\u0438\u0445 \u043f\u043e\u043b\u0456\u0432:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n$name = $_POST['name'];\r\n\r\n$surname = $_POST['surname'];\r\n$email = $_POST['email'];\r\n$message = $_POST['message'];\r\n?&gt;<\/pre>\n<p>5. \u0414\u0430\u043d\u0456 \u043c\u0438 \u043e\u0442\u0440\u0438\u043c\u0430\u043b\u0438, \u0442\u0435\u043f\u0435\u0440 \u043c\u0438 \u043c\u043e\u0436\u0435\u043c\u043e \u0457\u0445 \u0432\u0438\u0432\u0435\u0441\u0442\u0438, \u0434\u043b\u044f \u0446\u044c\u043e\u0433\u043e \u0432 \u0441\u0442\u043e\u0440\u0456\u043d\u043a\u0443 \u043e\u0431\u0440\u043e\u0431\u043d\u0438\u043a\u0430 \u0434\u043e\u043f\u0438\u0441\u0443\u0454\u043c\u043e \u043a\u043e\u0434:<\/p>\n<pre class=\"prettyprint linenums\">&lt;?php\r\n$name = $_POST['name'];\r\n\r\n$surname = $_POST['surname'];\r\n$email = $_POST['email'];\r\n$message = $_POST['message']; \r\n\r\necho $name.\"&lt;br \/&gt;\".$surname.\"&lt;br \/&gt;\".$email.\"&lt;br \/&gt;\".$message.\"&lt;br \/&gt;\"; \r\n?&gt;<\/pre>\n<p><strong>\u041d\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0454\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0442\u0430\u043a, \u0431\u0435\u0437 \u043f\u0435\u0440\u0435\u0432\u0456\u0440\u043a\u0438, \u0432\u0438\u0432\u043e\u0434\u0438\u0442\u0438 \u0432\u0432\u0435\u0434\u0435\u043d\u0456 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447\u0435\u043c \u0434\u0430\u043d\u0456.<\/strong><br \/>\n<strong>\u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0439\u0442\u0435 \u0437\u043c\u0456\u043d\u043d\u0456 \u0445\u043e\u0447\u0430 \u0431 \u0447\u0435\u0440\u0435\u0437 \u0444\u0443\u043d\u043a\u0446\u0456\u044e \u00a0<a href=\"http:\/\/php.net\/manual\/ru\/function.htmlspecialchars.php\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">htmlspecialchars<\/a>.<\/strong><\/p>\n<p>\u041e\u0441\u044c \u0442\u0430\u043a, \u043c\u043e\u0436\u043d\u0430 \u043e\u0442\u0440\u0438\u043c\u0443\u0432\u0430\u0442\u0438 \u0434\u0430\u043d\u0456 \u0432\u0432\u0435\u0434\u0435\u043d\u0456 \u0432 \u0435\u043b\u0435\u043c\u0435\u043d\u0442\u0438 \u0444\u043e\u0440\u043c\u0438.<\/p>\n<p><a href=\"http:\/\/php.net\/manual\/ru\/reserved.variables.post.php\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u0417\u043c\u0456\u043d\u043d\u0430 $_POST<\/a><br \/>\n<a href=\"http:\/\/php.net\/manual\/ru\/reserved.variables.server.php\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\u0417\u043c\u0456\u043d\u043d\u0430 $_SERVER<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u0423 \u0446\u044c\u043e\u043c\u0443 \u0443\u0440\u043e\u0446\u0456 \u043c\u0438 \u0437\u0430 \u0434\u043e\u043f\u043e\u043c\u043e\u0433\u043e\u044e \u0444\u0443\u043d\u043a\u0446\u0456\u0439 PHP \u043e\u0442\u0440\u0438\u043c\u0430\u0454\u043c\u043e \u0434\u0430\u043d\u0456, \u044f\u043a\u0456 \u0431\u0443\u0434\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u0438 \u043a\u043e\u0440\u0438\u0441\u0442\u0443\u0432\u0430\u0447 \u0443 \u0444\u043e\u0440\u043c\u0443. \u041f\u0435\u0440\u0448\u0435, \u0449\u043e \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0456\u0431\u043d\u043e &#8211; \u0446\u0435 \u0441\u0442\u0432\u043e\u0440\u0438\u0442\u0438 \u0444\u043e\u0440\u043c\u0443: &lt;form action=&#8221;app\/check.php&#8221; method=&#8221;post&#8221;&gt; &lt;p&gt;\u0406\u043c&#8217;\u044f: &lt;input name=&#8221;name&#8221; type=&#8221;text&#8221;&gt;&lt;\/p&gt; &lt;p&gt;\u0424\u0430\u043c\u0456\u043b\u0456\u044f: &lt;input name=&#8221;surname&#8221; type=&#8221;text&#8221;&gt;&lt;\/p&gt; &lt;p&gt;E-mail: &lt;input name=&#8221;email&#8221; type=&#8221;text&#8221;&gt;&lt;\/p&gt; &lt;p&gt;\u041f\u043e\u0432\u0456\u0434\u043e\u043c\u043b\u0435\u043d\u043d\u044f: &lt;br \/&gt;&lt;textarea name=&#8221;message&#8221; cols=&#8221;30&#8243; rows=&#8221;5&#8243;&gt;&lt;\/textarea&gt;&lt;\/p&gt; &lt;p&gt;&lt;input type=&#8217;submit&#8217; value=&#8217;\u0412\u0456\u0434\u043f\u0440\u0430\u0432\u0438\u0442\u0438&#8217;&gt;&lt;\/p&gt; &lt;\/form&gt; \u0417\u0432\u0435\u0440\u043d\u0456\u0442\u044c \u0443\u0432\u0430\u0433\u0443 \u043d\u0430 \u0440\u044f\u0434\u043e\u043a action= &#8220;app\/check.php&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-609","post","type-post","status-publish","format-standard","hentry","category-php-html"],"_links":{"self":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/609","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/comments?post=609"}],"version-history":[{"count":1,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/609\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/posts\/609\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/media?parent=609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/categories?post=609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ithub.oa.edu.ua\/webdev\/php\/wp-json\/wp\/v2\/tags?post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}