回答編集履歴

1

追記

2018/07/12 03:51

投稿

yambejp
yambejp

スコア114819

test CHANGED
@@ -11,3 +11,35 @@
11
11
  ```
12
12
 
13
13
  となるならできそうですが、空でいいので値がないと厳しいような・・・
14
+
15
+
16
+
17
+ # sample
18
+
19
+ ```PHP
20
+
21
+ <?PHP
22
+
23
+ $s=filter_input(INPUT_GET,"s");
24
+
25
+ $h["s"]=is_null($s)?"":htmlspecialchars($s);
26
+
27
+ print <<<eof
28
+
29
+ <form method="get">
30
+
31
+ <input type="text" name="s" value="{$h["s"]}">
32
+
33
+ <button type="submit" name="animals" value="cat">猫</button>
34
+
35
+ <button type="submit" name="animals" value="dog">犬</button>
36
+
37
+ <button type="submit" name="animals" value="rabbit">うさぎ</button>
38
+
39
+ </form>
40
+
41
+ eof;
42
+
43
+
44
+
45
+ ```