{"id":358,"date":"2024-04-08T01:35:09","date_gmt":"2024-04-08T01:35:09","guid":{"rendered":"https:\/\/www.freelifemakers.org\/wordpress\/?p=358"},"modified":"2024-04-10T01:17:41","modified_gmt":"2024-04-10T01:17:41","slug":"formaction1-post-method-data-form-transmission","status":"publish","type":"post","link":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/2024\/04\/08\/formaction1-post-method-data-form-transmission\/","title":{"rendered":"form_action1.php POST\ubc29\uc2dd \ud3fc \ub370\uc774\ud130 \uc804\uc1a1 POST method data form transmission"},"content":{"rendered":"\n<p>form_action1.php\uc740 \ud3fc\uc758 \uc804\uc1a1 \ubc29\uc2dd\uc774 &#8220;POST&#8221;\ubc29\uc2dd\uc77c\ub54c \ud654\uba74\uc5d0 \ud654\uba74\uc5d0 \uc774\ub984\uacfc \ud328\uc2a4\uc6cc\ub4dc\ub97c \ucd9c\ub825\ud558\ub294 \ud30c\uc77c \uc785\ub2c8\ub2e4.<br>\uc804\uc1a1 \ubc29\uc2dd\uc774 POST\ubc29\uc2dd\uc774 \uc544\ub2c8\uba74 \ucc28\ub2e8\ud558\uae30 \uc704\ud55c \ubcf4\uc548 \uc124\uc815\uc785\ub2c8\ub2e4.<br>form_action1.php is a file that displays the name and password on the screen when the form transmission method is &#8220;POST&#8221;.<br>This is a security setting to block transmission if the transmission method is not POST.<br><br><strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">1.<\/mark><\/strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\"><strong>$_SERVER[&#8216;REQUEST_METHOD&#8217;]<\/strong><\/mark><br> &#8211; \uc6f9\ud398\uc774\uc9c0\uc5d0 \uc5b4\ub5a4 \ubc29\uc2dd\uc73c\ub85c \ub370\uc774\ud130\ub97c \uc804\uc1a1 \ud588\ub294\uc9c0\ub97c \ud655\uc778\ud558\uae30 \uc704\ud55c \ud658\uacbd \ubcc0\uc218\uc785\ub2c8\ub2e4. (request method\ub77c\uace0 \ud569\ub2c8\ub2e4.)<br>This is an environment variable to check how data was transmitted to the web page. (It is called request method.)<br> &#8211; \uc544\ub798\ub294 $_SERVER[&#8216;REQUEST_METHOD&#8217;] \uad00\ub828 \uc124\uba85\uc785\ub2c8\ub2e4.<br>The link below explains $_SERVER[&#8216;REQUEST_METHOD&#8217;].<br><a rel=\"noreferrer noopener\" href=\"https:\/\/www.php.net\/manual\/en\/reserved.variables.server.php\" target=\"_blank\">https:\/\/www.php.net\/manual\/en\/reserved.variables.server.php<\/a><br><\/p>\n\n\n\n<p><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\"><strong>2.$_POST[&#8216;name&#8217;];<\/strong><\/mark><br>&#8211; from1.php\ud30c\uc77c\uc5d0\uc11c post\ubc29\uc2dd\uc73c\ub85c \ub118\uc5b4\uc628 \ub370\uc774\ud130\ub97c \ubc1b\ub294 \ubd80\ubd84\uc785\ub2c8\ub2e4.<br>$_POST[<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">&#8216;name<\/mark>&#8216;]\uc740 form1.php\ud30c\uc77c\uc758 \ucf54\ub4dc\uc5d0\uc11c name = &#8220;name&#8221; \ubd80\ubd84\uc774\uba70 &#8220;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">name<\/mark>&#8220;\uc774 \ubcc0\uc218\uba85\uc774 \ub429\ub2c8\ub2e4.<br>$_POST[&#8216;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">pswd<\/mark>&#8216;]\ub294 form1.php\ud30c\uc77c\uc758 \ucf54\ub4dc\uc5d0\uc11c name=&#8221;pswd&#8221; \ubd80\ubd84\uc774\uba70 &#8220;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">pswd<\/mark>&#8220;\uac00 \ubcc0\uc218\uba85\uc774 \ub429\ub2c8\ub2e4.<\/p>\n\n\n\n<p>This is the part that receives data sent through the post method in the from1.php file.<br>$_POST[&#8216;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">name<\/mark>&#8216;] is the name = &#8220;name&#8221; part in the code of the form1.php file, and &#8220;name&#8221; becomes the variable name.<br>$_POST[&#8216;<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">pswd<\/mark>&#8216;] is the name=&#8221;pswd&#8221; part in the code of the form1.php file, and &#8220;pswd&#8221; becomes the variable name.<\/p>\n\n\n\n<p>\uc544\ub798\ub9c1\ud06c\ub294 HTTP POST \ubcc0\uc218 \uc124\uba85\uc785\ub2c8\ub2e4.<br>The link below explains HTTP POST variables.<br><a href=\"https:\/\/www.php.net\/manual\/en\/reserved.variables.post\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.php.net\/manual\/en\/reserved.variables.post<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;input type=\"name\" class=\"form-control\" id=\"name\" placeholder=\"\ub2f9\uc2e0\uc758 \uc774\ub984\uc744 \uc785\ub825\ud558\uc138\uc694(Enter Your Name)\" name=\"<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">name<\/mark>\"&gt;\n&lt;input type=\"password\" class=\"form-control\" id=\"pwd\" placeholder=\"Enter password\" name=\"<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">pswd<\/mark>\"&gt;<\/code><\/pre>\n\n\n\n<p><strong>3.\uc804\uccb4\ucf54\ub4dc(full code)<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;?php  \nif(<mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-orange-color\">$_SERVER&#91;'REQUEST_METHOD']<\/mark> == \"POST\"){\n\n   $f_name = <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\">$_POST&#91;'name'];<\/mark>\n   $f_pwd = <mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-green-color\">$_POST&#91;'pswd'];<\/mark>\n}\necho $f_name.\"&lt;br&gt;\";\necho $f_pwd;\n?&gt;<\/code><\/pre>\n\n\n\n<iframe loading=\"lazy\" src=\"https:\/\/www.facebook.com\/plugins\/video.php?height=476&#038;href=https%3A%2F%2Fwww.facebook.com%2Fgideonslife01%2Fvideos%2F3640437976209952%2F&#038;show_text=false&#038;width=267&#038;t=0\" width=\"267\" height=\"476\" style=\"border:none;overflow:hidden\" scrolling=\"no\" frameborder=\"0\" allowfullscreen=\"true\" allow=\"autoplay; clipboard-write; encrypted-media; picture-in-picture; web-share\" allowFullScreen=\"true\"><\/iframe>\n","protected":false},"excerpt":{"rendered":"<p>form_action1.php\uc740 \ud3fc\uc758 \uc804\uc1a1 \ubc29\uc2dd\uc774 &#8220;POST&#8221;\ubc29\uc2dd\uc77c\ub54c \ud654\uba74\uc5d0 \ud654\uba74\uc5d0 \uc774\ub984\uacfc \ud328\uc2a4\uc6cc\ub4dc\ub97c \ucd9c\ub825\ud558\ub294 \ud30c\uc77c \uc785\ub2c8\ub2e4.\uc804\uc1a1 \ubc29\uc2dd\uc774 POST\ubc29\uc2dd\uc774 \uc544\ub2c8\uba74 \ucc28\ub2e8\ud558\uae30 \uc704\ud55c \ubcf4\uc548 \uc124\uc815\uc785\ub2c8\ub2e4.form_action1.php is a file that displays the name and password on the screen when the form transmission method is &#8220;POST&#8221;.This is a security setting to block transmission if the transmission method is not POST. 1.$_SERVER[&#8216;REQUEST_METHOD&#8217;] &#8211; \uc6f9\ud398\uc774\uc9c0\uc5d0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-358","post","type-post","status-publish","format-standard","hentry","category-php","missing-thumbnail"],"_links":{"self":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=358"}],"version-history":[{"count":7,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/358\/revisions"}],"predecessor-version":[{"id":372,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/358\/revisions\/372"}],"wp:attachment":[{"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.freelifemakers.org\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}