回答編集履歴
1
sample
test
CHANGED
@@ -1,3 +1,65 @@
|
|
1
1
|
headerはあらゆるの出力の前に書かないといけません
|
2
2
|
|
3
3
|
例示のものだとHTMLが先に書いてあるのでおかしいです
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
# sample
|
8
|
+
|
9
|
+
たとえばこう
|
10
|
+
|
11
|
+
```PHP
|
12
|
+
|
13
|
+
<?php
|
14
|
+
|
15
|
+
$input=filter_input(INPUT_POST,"inputtext");
|
16
|
+
|
17
|
+
switch($input){
|
18
|
+
|
19
|
+
case "hoge1":
|
20
|
+
|
21
|
+
header("location: Introduction3.php");
|
22
|
+
|
23
|
+
exit;
|
24
|
+
|
25
|
+
case "hoge2":
|
26
|
+
|
27
|
+
header("location: Introduction1.php");
|
28
|
+
|
29
|
+
exit;
|
30
|
+
|
31
|
+
case "hoge3":
|
32
|
+
|
33
|
+
header("location: Introduction2.php");
|
34
|
+
|
35
|
+
exit;
|
36
|
+
|
37
|
+
case "hoge4":
|
38
|
+
|
39
|
+
header("location: Introduction4.php");
|
40
|
+
|
41
|
+
exit;
|
42
|
+
|
43
|
+
}
|
44
|
+
|
45
|
+
?>
|
46
|
+
|
47
|
+
<form method="POST">
|
48
|
+
|
49
|
+
<select name="inputtext">
|
50
|
+
|
51
|
+
<option value="hoge1">hoge1</option>
|
52
|
+
|
53
|
+
<option value="hoge2">hoge2</option>
|
54
|
+
|
55
|
+
<option value="hoge3">hoge3</option>
|
56
|
+
|
57
|
+
<option value="hoge4">hoge4</option>
|
58
|
+
|
59
|
+
</select>
|
60
|
+
|
61
|
+
<button type="submit">Search</button>
|
62
|
+
|
63
|
+
</form>
|
64
|
+
|
65
|
+
```
|