質問編集履歴
2
最訂正します。
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,6 +14,8 @@
|
|
14
14
|
|
15
15
|
<?php
|
16
16
|
|
17
|
+
session_cache_limiter('private_no_expire');
|
18
|
+
|
17
19
|
require_once('login_tmp.php');
|
18
20
|
|
19
21
|
require_once('../common/common.php');
|
@@ -24,191 +26,59 @@
|
|
24
26
|
|
25
27
|
<html>
|
26
28
|
|
27
|
-
<head><meta charset=
|
29
|
+
<head><meta charset=UTF-8>
|
28
30
|
|
31
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
32
|
+
|
29
|
-
<title>プロフィール
|
33
|
+
<title>プロフィール登録完了</title>
|
30
34
|
|
31
35
|
</head>
|
32
36
|
|
33
37
|
<body>
|
34
38
|
|
39
|
+
<h3>プロフィール登録完了</h3><br />
|
40
|
+
|
35
41
|
<?php
|
36
42
|
|
37
43
|
|
38
|
-
|
39
|
-
$err='';
|
40
44
|
|
41
45
|
$post=sanitize($_POST);
|
42
46
|
|
43
47
|
|
44
48
|
|
45
|
-
|
49
|
+
$id=$_SESSION['id'];
|
46
|
-
|
47
|
-
print '<form name="update_profile_check" method="post" action="update_profile_done.php"><br />';
|
48
50
|
|
49
51
|
|
50
52
|
|
51
|
-
|
53
|
+
if($id=='')
|
52
54
|
|
53
|
-
|
55
|
+
{
|
54
|
-
|
55
|
-
print $idol_name.'</br />';
|
56
|
-
|
57
|
-
print '<input type="hidden" name="idol_name" value="'.$idol_name.'">';
|
58
56
|
|
59
57
|
|
60
58
|
|
61
|
-
print '
|
59
|
+
print '無効なパラメータです。';
|
60
|
+
|
61
|
+
exit();
|
62
62
|
|
63
63
|
|
64
|
-
|
65
|
-
$pref_arr=array(
|
66
|
-
|
67
|
-
"0"=>"内緒"
|
68
|
-
|
69
|
-
,"1"=>"北海道"
|
70
|
-
|
71
|
-
,"2"=>"青森県"
|
72
|
-
|
73
|
-
,"3"=>"岩手県"
|
74
|
-
|
75
|
-
,"4"=>"宮城県"
|
76
|
-
|
77
|
-
,"5"=>"秋田県"
|
78
|
-
|
79
|
-
,"6"=>"山形県"
|
80
|
-
|
81
|
-
,"7"=>"福島県"
|
82
|
-
|
83
|
-
,"8"=>"茨城県"
|
84
|
-
|
85
|
-
,"9"=>"栃木県"
|
86
|
-
|
87
|
-
,"10"=>"群馬県"
|
88
|
-
|
89
|
-
,"11"=>"埼玉県"
|
90
|
-
|
91
|
-
,"12"=>"千葉県"
|
92
|
-
|
93
|
-
,"13"=>"東京都"
|
94
|
-
|
95
|
-
,"14"=>"神奈川県"
|
96
|
-
|
97
|
-
,"15"=>"新潟県"
|
98
|
-
|
99
|
-
,"16"=>"富山県"
|
100
|
-
|
101
|
-
,"17"=>"石川県"
|
102
|
-
|
103
|
-
,"18"=>"福井県"
|
104
|
-
|
105
|
-
,"19"=>"山梨県"
|
106
|
-
|
107
|
-
,"20"=>"長野県"
|
108
|
-
|
109
|
-
,"21"=>"岐阜県"
|
110
|
-
|
111
|
-
,"22"=>"静岡県"
|
112
|
-
|
113
|
-
,"23"=>"愛知県"
|
114
|
-
|
115
|
-
,"24"=>"三重県"
|
116
|
-
|
117
|
-
,"25"=>"滋賀県"
|
118
|
-
|
119
|
-
,"26"=>"京都府"
|
120
|
-
|
121
|
-
,"27"=>"大阪府"
|
122
|
-
|
123
|
-
,"28"=>"兵庫県"
|
124
|
-
|
125
|
-
,"29"=>"奈良県"
|
126
|
-
|
127
|
-
,"30"=>"和歌山県"
|
128
|
-
|
129
|
-
,"31"=>"鳥取県"
|
130
|
-
|
131
|
-
,"32"=>"島根県"
|
132
|
-
|
133
|
-
,"33"=>"岡山県"
|
134
|
-
|
135
|
-
,"34"=>"広島県"
|
136
|
-
|
137
|
-
,"35"=>"山口県"
|
138
|
-
|
139
|
-
,"36"=>"徳島県"
|
140
|
-
|
141
|
-
,"37"=>"香川県"
|
142
|
-
|
143
|
-
,"38"=>"愛媛県"
|
144
|
-
|
145
|
-
,"39"=>"高知県"
|
146
|
-
|
147
|
-
,"40"=>"福岡県"
|
148
|
-
|
149
|
-
,"41"=>"佐賀県"
|
150
|
-
|
151
|
-
,"42"=>"長崎県"
|
152
|
-
|
153
|
-
,"43"=>"熊本県"
|
154
|
-
|
155
|
-
,"44"=>"大分県"
|
156
|
-
|
157
|
-
,"45"=>"宮崎県"
|
158
|
-
|
159
|
-
,"46"=>"鹿児島県"
|
160
|
-
|
161
|
-
,"47"=>"沖縄県"
|
162
|
-
|
163
|
-
);
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
if (isset($post['pref_id'])) {
|
170
|
-
|
171
|
-
if ($post['pref_id'] != "") {
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
$pref_id=$post['pref_id'];
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
}else{
|
180
|
-
|
181
|
-
print '都道府県が入力されていません。';
|
182
|
-
|
183
|
-
print '<input type="button" onclick="history.back()" value="戻る">';
|
184
|
-
|
185
|
-
exit();
|
186
64
|
|
187
65
|
}
|
188
66
|
|
189
67
|
|
190
68
|
|
191
|
-
|
69
|
+
//データベース接続
|
192
70
|
|
193
|
-
|
71
|
+
$dsn='mysql:host=localhost;dbname=idol;charset=utf8';
|
194
72
|
|
195
|
-
|
73
|
+
$user='root';
|
196
74
|
|
197
|
-
{
|
198
|
-
|
199
|
-
|
75
|
+
$password='';
|
200
|
-
|
201
|
-
}
|
202
|
-
|
203
|
-
}
|
204
|
-
|
205
|
-
}
|
206
76
|
|
207
77
|
|
208
78
|
|
209
|
-
|
79
|
+
$dbh= new PDO($dsn,$user,$password);
|
210
80
|
|
211
|
-
|
81
|
+
$dbh->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
|
212
82
|
|
213
83
|
|
214
84
|
|
@@ -218,15 +88,25 @@
|
|
218
88
|
|
219
89
|
|
220
90
|
|
221
|
-
|
91
|
+
$sql1='SELECT * FROM mst_img WHERE mem_id=? AND img_flg=11';
|
222
92
|
|
93
|
+
|
94
|
+
|
95
|
+
$stmh1=$dbh->prepare($sql1);
|
96
|
+
|
97
|
+
$stmh1 -> bindValue(1, $id, PDO::PARAM_INT);
|
98
|
+
|
223
|
-
|
99
|
+
$stmh1->execute();
|
224
100
|
|
225
101
|
|
226
102
|
|
227
|
-
|
103
|
+
// $image=substr($image,4);
|
228
104
|
|
105
|
+
// print $image;
|
106
|
+
|
229
|
-
|
107
|
+
{
|
108
|
+
|
109
|
+
{
|
230
110
|
|
231
111
|
|
232
112
|
|
@@ -236,9 +116,15 @@
|
|
236
116
|
|
237
117
|
|
238
118
|
|
239
|
-
|
119
|
+
$sql2='SELECT * FROM mst_img WHERE mem_id=? AND img_flg=21';
|
240
120
|
|
121
|
+
|
122
|
+
|
123
|
+
$stmh2=$dbh->prepare($sql2);
|
124
|
+
|
125
|
+
$stmh2 -> bindValue(1, $id, PDO::PARAM_INT);
|
126
|
+
|
241
|
-
|
127
|
+
$stmh2->execute();
|
242
128
|
|
243
129
|
|
244
130
|
|
@@ -254,9 +140,15 @@
|
|
254
140
|
|
255
141
|
|
256
142
|
|
257
|
-
|
143
|
+
$sql3='SELECT * FROM mst_img WHERE mem_id=? AND img_flg=31';
|
258
144
|
|
145
|
+
|
146
|
+
|
147
|
+
$stmh3=$dbh->prepare($sql3);
|
148
|
+
|
149
|
+
$stmh3 -> bindValue(1, $id, PDO::PARAM_INT);
|
150
|
+
|
259
|
-
|
151
|
+
$stmh3->execute();
|
260
152
|
|
261
153
|
|
262
154
|
|
@@ -272,49 +164,25 @@
|
|
272
164
|
|
273
165
|
|
274
166
|
|
275
|
-
|
167
|
+
$sql4='SELECT * FROM mst_img WHERE mem_id=? AND img_flg=41';
|
276
|
-
|
277
|
-
print $del_img06;
|
278
168
|
|
279
169
|
|
280
170
|
|
171
|
+
$stmh4=$dbh->prepare($sql4);
|
172
|
+
|
173
|
+
$stmh4 -> bindValue(1, $id, PDO::PARAM_INT);
|
174
|
+
|
175
|
+
$stmh4->execute();
|
176
|
+
|
177
|
+
|
178
|
+
|
281
|
-
|
179
|
+
}
|
282
180
|
|
283
181
|
}
|
284
182
|
|
183
|
+
?>
|
285
184
|
|
286
|
-
|
287
|
-
$appeal=$post['appeal'];
|
288
|
-
|
289
|
-
print '<textarea name="appeal" rows="8" cols="20">';
|
290
|
-
|
291
|
-
print $appeal;
|
292
|
-
|
293
|
-
print '</textarea>';
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
185
|
+
<a href="update_profile.php">プロフィール編集</a>
|
302
|
-
|
303
|
-
print '<br /><br />';
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
if($err=='1')
|
308
|
-
|
309
|
-
{
|
310
|
-
|
311
|
-
print '<input type="button" onclick="history.back()" value="修正する">';
|
312
|
-
|
313
|
-
}
|
314
|
-
|
315
|
-
print '</form>';
|
316
|
-
|
317
|
-
?>
|
318
186
|
|
319
187
|
</body>
|
320
188
|
|
1
張り付けたソースが異なっていたため。
test
CHANGED
File without changes
|
test
CHANGED
@@ -174,7 +174,7 @@
|
|
174
174
|
|
175
175
|
$pref_id=$post['pref_id'];
|
176
176
|
|
177
|
-
|
177
|
+
|
178
178
|
|
179
179
|
}else{
|
180
180
|
|