+++ form.php
... | ... | @@ -0,0 +1,26 @@ |
1 | +<!doctype html> | |
2 | +<html lang="ko"> | |
3 | +<head> | |
4 | + <meta charset="UTF-8"> | |
5 | + <meta name="viewport" | |
6 | + content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
7 | + <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
8 | + <title>form</title> | |
9 | +</head> | |
10 | +<body> | |
11 | + <h3>Get</h3> | |
12 | + <form action="get.php" method="get"> | |
13 | + ID : <input type="text" name="id"><br> | |
14 | + P/W : <input type="password" name="pw"> | |
15 | + <input type="submit"> | |
16 | + </form> | |
17 | + <br> | |
18 | + <hr> | |
19 | + <h3>Post</h3> | |
20 | + <form action="post.php" method="post"> | |
21 | + ID : <input type="text" name="id"><br> | |
22 | + P/W : <input type="password" name="pw"> | |
23 | + <input type="submit"> | |
24 | + </form> | |
25 | +</body> | |
26 | +</html>(No newline at end of file) |
+++ get.php
... | ... | @@ -0,0 +1,20 @@ |
1 | +<!doctype html> | |
2 | +<html lang="en"> | |
3 | +<head> | |
4 | + <meta charset="UTF-8"> | |
5 | + <meta name="viewport" | |
6 | + content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
7 | + <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
8 | + <title>Document</title> | |
9 | +</head> | |
10 | +<body> | |
11 | + <h3>GET</h3> | |
12 | + <?php | |
13 | + $id = $_GET["id"]; | |
14 | + $pw = $_GET["pw"]; | |
15 | + | |
16 | + echo "ID : " . $id . " "; | |
17 | + echo "P/W : " . $pw; | |
18 | + ?> | |
19 | +</body> | |
20 | +</html>(No newline at end of file) |
+++ post.php
... | ... | @@ -0,0 +1,20 @@ |
1 | +<!doctype html> | |
2 | +<html lang="en"> | |
3 | +<head> | |
4 | + <meta charset="UTF-8"> | |
5 | + <meta name="viewport" | |
6 | + content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
7 | + <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
8 | + <title>Document</title> | |
9 | +</head> | |
10 | +<body> | |
11 | +<h3>Post</h3> | |
12 | +<?php | |
13 | +$id = $_POST["id"]; | |
14 | +$pw = $_POST["pw"]; | |
15 | + | |
16 | +echo "ID : " . $id . " "; | |
17 | +echo "P/W : " . $pw; | |
18 | +?> | |
19 | +</body> | |
20 | +</html>(No newline at end of file) |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?