質問編集履歴
1
ソースを書かせていただきました
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,14 +32,238 @@
|
|
32
32
|
|
33
33
|
### 該当のソースコード
|
34
34
|
|
35
|
-
|
35
|
+
```
|
36
|
+
|
36
|
-
|
37
|
+
<?php foreach ($_POST as $key => $value){
|
38
|
+
|
39
|
+
$post[$key] = htmlspecialchars($value);
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
//メール送信用
|
48
|
+
|
49
|
+
mb_language("Japanese");
|
50
|
+
|
51
|
+
mb_internal_encoding("UTF-8");
|
52
|
+
|
53
|
+
$to = $post["mail"] ;
|
54
|
+
|
55
|
+
$to_saiyo = "●●●●●●●●●●●●●●●●●";
|
56
|
+
|
57
|
+
$mb_title = "お問い合わせ";
|
58
|
+
|
59
|
+
$content .= "
|
60
|
+
|
61
|
+
受付完了のご連絡
|
62
|
+
|
63
|
+
■□■---------------------------------------------------------
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
お問い合わせ
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
---------------------------------------------------------■□■
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
".
|
76
|
+
|
77
|
+
$post['name']
|
78
|
+
|
79
|
+
."様
|
80
|
+
|
81
|
+
問い合わせいただきましてありがとうございます。
|
82
|
+
|
83
|
+
弊社担当より、近日中にご連絡いたします。
|
84
|
+
|
37
|
-
|
85
|
+
少々お待ちくださいませ。
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
※本メールは自動返信とさせていただいております。
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
";
|
96
|
+
|
97
|
+
foreach ($post as $key => $value) {
|
98
|
+
|
99
|
+
if ($key=="name") {
|
100
|
+
|
101
|
+
$content .= "■氏名:".$value."\r\n";
|
102
|
+
|
103
|
+
$saiyo_content .= "■氏名:".$value."\r\n";
|
104
|
+
|
105
|
+
}elseif ($key=="hurigana") {
|
106
|
+
|
107
|
+
$content .= "■フリガナ:".$value."\r\n";
|
108
|
+
|
109
|
+
$saiyo_content .= "■フリガナ:".$value."\r\n";
|
110
|
+
|
111
|
+
}elseif ($key=="university") {
|
112
|
+
|
113
|
+
$content .= "■大学:".$value."\r\n";
|
114
|
+
|
115
|
+
$saiyo_content .= "■大学:".$value."\r\n";
|
116
|
+
|
117
|
+
}elseif ($key=="major") {
|
118
|
+
|
119
|
+
$content .= "■学部・学科:".$value."\r\n";
|
120
|
+
|
121
|
+
$saiyo_content .= "■学部・学科:".$value."\r\n";
|
122
|
+
|
123
|
+
}elseif ($key=="number") {
|
124
|
+
|
125
|
+
$content .= "■学年:".$value."\r\n";
|
126
|
+
|
127
|
+
$saiyo_content .= "■学年:".$value."\r\n";
|
128
|
+
|
129
|
+
}elseif ($key=="club") {
|
130
|
+
|
131
|
+
$content .= "■部活・サークル:".$value."\r\n";
|
132
|
+
|
133
|
+
$saiyo_content .= "■部活・サークル:".$value."\r\n";
|
134
|
+
|
135
|
+
}elseif ($key=="tel") {
|
136
|
+
|
137
|
+
$content .= "■電話番号:".$value."\r\n";
|
138
|
+
|
139
|
+
$saiyo_content .= "■電話番号:".$value."\r\n";
|
140
|
+
|
141
|
+
}elseif ($key=="address") {
|
142
|
+
|
143
|
+
$content .= "■住所:".$value."\r\n";
|
144
|
+
|
145
|
+
$saiyo_content .= "■住所:".$value."\r\n";
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
}elseif ($key=="mail") {
|
150
|
+
|
151
|
+
$content .= "■メールアドレス:".$value."\r\n";
|
152
|
+
|
153
|
+
$saiyo_content .= "■メールアドレス:".$value."\r\n";
|
154
|
+
|
155
|
+
}elseif ($key=="ask") {
|
156
|
+
|
157
|
+
$content .= "■お問い合わせ内容:".$value."\r\n";
|
158
|
+
|
159
|
+
$saiyo_content .= "■お問い合わせ内容:".$value."\r\n";
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
$content .= "
|
166
|
+
|
167
|
+
=====================================
|
168
|
+
|
169
|
+
株式会社●●●●●●●●●
|
170
|
+
|
171
|
+
=====================================
|
172
|
+
|
173
|
+
";
|
174
|
+
|
175
|
+
$from = "From: website\r\nReturn-Path:website";
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
mb_send_mail($to, $mb_title, $content, $from);//お客様向け;
|
180
|
+
|
181
|
+
mb_send_mail($to_saiyo, $mb_title, $saiyo_content, $from);//営業向け
|
182
|
+
|
183
|
+
?>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<!DOCTYPE html>
|
188
|
+
|
189
|
+
<html lang="ja" dir="ltr">
|
190
|
+
|
191
|
+
<head>
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
<!-- Event snippet for メール反響 conversion page -->
|
196
|
+
|
197
|
+
<script>
|
198
|
+
|
199
|
+
gtag('event', 'conversion', {'send_to': 'AW-733556925/OttZCLHp3qIBEL3h5N0C'});
|
200
|
+
|
201
|
+
</script>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
</head>
|
206
|
+
|
207
|
+
<body>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<form class="entry" id="entry" action="sendmail.php">
|
214
|
+
|
215
|
+
<p>以下の内容で送信しました。ありがとうございました。</p>
|
216
|
+
|
217
|
+
<ul class="confirm" id="confirm">
|
218
|
+
|
219
|
+
<dt class="confirm__title">氏名</dt>
|
220
|
+
|
221
|
+
<dd class="confirm__description"><?php echo $post["name"] ?></dd>
|
222
|
+
|
223
|
+
<dt class="confirm__title">フリガナ</dt>
|
224
|
+
|
225
|
+
<dd class="confirm__description"><?php echo $post["hurigana"] ?></dd>
|
226
|
+
|
227
|
+
<dt class="confirm__title">電話番号</dt>
|
228
|
+
|
229
|
+
<dd class="confirm__description"><?php echo $post["tel"] ?></dd>
|
230
|
+
|
231
|
+
<dt class="confirm__title">メールアドレス</dt>
|
232
|
+
|
233
|
+
<dd class="confirm__description"><?php echo $post["mail"] ?></dd>
|
234
|
+
|
235
|
+
<dt class="confirm__title">お問い合わせ内容</dt>
|
236
|
+
|
237
|
+
<dd class="confirm__description"><?php echo $post["ask"] ?></dd>
|
238
|
+
|
239
|
+
</ul>
|
240
|
+
|
241
|
+
</form>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
</body>
|
250
|
+
|
251
|
+
</html>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
コード
|
256
|
+
|
257
|
+
```
|
38
258
|
|
39
259
|
ソースコード
|
40
260
|
|
41
261
|
```
|
42
262
|
|
263
|
+
```
|
264
|
+
|
265
|
+
```
|
266
|
+
|
43
267
|
|
44
268
|
|
45
269
|
### 試したこと
|