안효원 안효원 2022-01-07
getPost add
@22c4e55d7f0125aea867ecacd92f80cb84afe235
 
form.php (added)
+++ form.php
@@ -0,0 +1,26 @@
+<!doctype html>
+<html lang="ko">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>form</title>
+</head>
+<body>
+    <h3>Get</h3>
+    <form action="get.php" method="get">
+        ID : <input type="text" name="id"><br>
+        P/W : <input type="password" name="pw">
+        <input type="submit">
+    </form>
+    <br>
+    <hr>
+    <h3>Post</h3>
+    <form action="post.php" method="post">
+        ID : <input type="text" name="id"><br>
+        P/W : <input type="password" name="pw">
+        <input type="submit">
+    </form>
+</body>
+</html>(No newline at end of file)
 
get.php (added)
+++ get.php
@@ -0,0 +1,20 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>Document</title>
+</head>
+<body>
+    <h3>GET</h3>
+    <?php
+        $id = $_GET["id"];
+        $pw = $_GET["pw"];
+
+        echo "ID : " . $id . " ";
+        echo "P/W : " . $pw;
+    ?>
+</body>
+</html>(No newline at end of file)
 
post.php (added)
+++ post.php
@@ -0,0 +1,20 @@
+<!doctype html>
+<html lang="en">
+<head>
+    <meta charset="UTF-8">
+    <meta name="viewport"
+          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
+    <meta http-equiv="X-UA-Compatible" content="ie=edge">
+    <title>Document</title>
+</head>
+<body>
+<h3>Post</h3>
+<?php
+$id = $_POST["id"];
+$pw = $_POST["pw"];
+
+echo "ID : " . $id . " ";
+echo "P/W : " . $pw;
+?>
+</body>
+</html>(No newline at end of file)
Add a comment
List