--- form.php
+++ form.php
... | ... | @@ -14,13 +14,16 @@ |
14 | 14 |
P/W : <input type="password" name="pw"> |
15 | 15 |
<input type="submit"> |
16 | 16 |
</form> |
17 |
+ |
|
17 | 18 |
<br> |
18 | 19 |
<hr> |
20 |
+ |
|
19 | 21 |
<h3>Post</h3> |
20 | 22 |
<form action="post.php" method="post"> |
21 | 23 |
ID : <input type="text" name="id"><br> |
22 | 24 |
P/W : <input type="password" name="pw"> |
23 |
- <input type="submit"> |
|
25 |
+ <input type="submit" value="POST"> |
|
26 |
+ <button formaction="get.php?id=<?php echo $_GET["id"] ?>&pw=<?php echo $_GET["pw"] ?>">GET</button> |
|
24 | 27 |
</form> |
25 | 28 |
</body> |
26 | 29 |
</html>(No newline at end of file) |
+++ form_1.php
... | ... | @@ -0,0 +1,16 @@ |
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>Document</title> | |
9 | +</head> | |
10 | +<body> | |
11 | + <form action="form_1_receive.php"> | |
12 | + 과일을 입력하세요 : <input type="text" name="fruits"> | |
13 | + <input type="submit"> | |
14 | + </form> | |
15 | +</body> | |
16 | +</html>(No newline at end of file) |
+++ form_1_receive.php
... | ... | @@ -0,0 +1,4 @@ |
1 | +<?php | |
2 | + $fruits = $_GET["fruits"]; | |
3 | + | |
4 | + echo "과일 : " . $fruits;(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?