質問編集履歴
1
質問本文に転記します。また、改めてコードミスを修正しました
test
CHANGED
File without changes
|
test
CHANGED
@@ -65,3 +65,143 @@
|
|
65
65
|
アドバイスを頂ければとてもありがたいです。
|
66
66
|
|
67
67
|
なにとぞ、宜しくお願い申し上げます。
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
```ここに言語を入力
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
convsert.php
|
76
|
+
|
77
|
+
<!DOCTYPE html>
|
78
|
+
|
79
|
+
<html>
|
80
|
+
|
81
|
+
<head>
|
82
|
+
|
83
|
+
<meta charset="utf-8">
|
84
|
+
|
85
|
+
<title></title>
|
86
|
+
|
87
|
+
</head>
|
88
|
+
|
89
|
+
<body>
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<?
|
94
|
+
|
95
|
+
$array_11=array("a","b");
|
96
|
+
|
97
|
+
$array_12=array("c","d");
|
98
|
+
|
99
|
+
$array_21=array("甲","乙");
|
100
|
+
|
101
|
+
$array_22=array("丙","丁");
|
102
|
+
|
103
|
+
$array_23=array("戊","己");
|
104
|
+
|
105
|
+
$array_24=array("己","庚");
|
106
|
+
|
107
|
+
?>
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<form class="" action="convert.php" method="post">
|
112
|
+
|
113
|
+
<input type="radio" name="q1" value="A">A
|
114
|
+
|
115
|
+
<input type="radio" name="q1" value="B">B
|
116
|
+
|
117
|
+
<input type="submit" name="rs_1" value="選択する_その1">
|
118
|
+
|
119
|
+
</form><br>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<!---:::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
124
|
+
|
125
|
+
選択する_その1
|
126
|
+
|
127
|
+
AかBかを選択することでA->a,b B->c,dの2X2の4通り
|
128
|
+
|
129
|
+
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<? if (isset($_POST['rs_1'])):?>
|
134
|
+
|
135
|
+
<? $choice_1=$_POST['q1'];?>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
<?if ($choice_1=="A"):?>
|
140
|
+
|
141
|
+
<form class="" action="convert.php" method="post">
|
142
|
+
|
143
|
+
<input type="radio" name="q2" value="A"><?echo $array_11[0];?>
|
144
|
+
|
145
|
+
<input type="radio" name="q2" value="B"><?echo $array_11[1];?>
|
146
|
+
|
147
|
+
<input type="submit" name="rs_2" value="選択する_その2">
|
148
|
+
|
149
|
+
</form>
|
150
|
+
|
151
|
+
<?endif;?>
|
152
|
+
|
153
|
+
<?if ($choice_1=="B"):?>
|
154
|
+
|
155
|
+
<form class="" action="convert.php" method="post">
|
156
|
+
|
157
|
+
<input type="radio" name="q2" value="A"><?echo $array_12[0];?>
|
158
|
+
|
159
|
+
<input type="radio" name="q2" value="B"><?echo $array_12[1];?>
|
160
|
+
|
161
|
+
<input type="submit" name="rs_2" value="選択する_その2">
|
162
|
+
|
163
|
+
</form>
|
164
|
+
|
165
|
+
<?endif;?>
|
166
|
+
|
167
|
+
<?endif;?>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<!---:::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
172
|
+
|
173
|
+
選択する_その2
|
174
|
+
|
175
|
+
A->a->甲、乙 A->b->丙、丁
|
176
|
+
|
177
|
+
B->c->戊、己 B->d->己、庚
|
178
|
+
|
179
|
+
の4X2=8通りの結果を最終的に出力する
|
180
|
+
|
181
|
+
!!その際、a,b,c,dを選んだ場合でもPOSTしてもそれらの選択肢をけさない!!
|
182
|
+
|
183
|
+
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::-->
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<? if (isset($_POST['rs_2'])):?>
|
188
|
+
|
189
|
+
<? $choice_2=$_POST['q2'];?>
|
190
|
+
|
191
|
+
<?if ($choice_2=="a") {print_r($array_21);}?>
|
192
|
+
|
193
|
+
<?if ($choice_2=="b") {print_r($array_22);}?>
|
194
|
+
|
195
|
+
<?if ($choice_2=="c") {print_r($array_23);}?>
|
196
|
+
|
197
|
+
<?if ($choice_2=="d") {print_r($array_24);}?>
|
198
|
+
|
199
|
+
<?endif;?>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
</body>
|
204
|
+
|
205
|
+
</html>
|
206
|
+
|
207
|
+
```
|