質問編集履歴
3
タイトルをより具体的な内容に変更しました。
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
PHP
|
1
|
+
PHP ウォーニング(警告)を解消したい
|
body
CHANGED
File without changes
|
2
ファイルの構成、関わる全てのファイルのプログラムを追記しました。よろしくお願いします。
title
CHANGED
File without changes
|
body
CHANGED
@@ -243,7 +243,7 @@
|
|
243
243
|
</body>
|
244
244
|
</html>
|
245
245
|
|
246
|
-
tmpl/
|
246
|
+
tmpl/conf.tmpl
|
247
247
|
|
248
248
|
<!doctypr html>
|
249
249
|
<html>
|
1
ファイルの構成、関わる全てのファイルのプログラムを追記しました。よろしくお願いします。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
### 前提・実現したいこと
|
2
2
|
|
3
|
-
|
4
|
-
|
5
3
|
PHPで、お問合せフォームを作っています。
|
6
4
|
ごくシンプルなものですが、ラジオボタンがあります。
|
7
5
|
完成させたいのですが、ご教示お願いします。
|
8
6
|
|
7
|
+
ファイル構成は、index.html,sample.php,user.csvと
|
8
|
+
tmplのフォルダ。その中に、comf.tmpl,error.tmpl,send.tmpl
|
9
|
+
があります。
|
9
10
|
|
11
|
+
csvファイルに顧客データを記録するためのシステム構築を考えております。
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
10
16
|
### 発生している問題・エラーメッセージ
|
11
17
|
|
12
18
|
```
|
@@ -17,6 +23,9 @@
|
|
17
23
|
### 該当のソースコード
|
18
24
|
|
19
25
|
```ここに言語名を入力
|
26
|
+
|
27
|
+
sample.php
|
28
|
+
|
20
29
|
<?php
|
21
30
|
|
22
31
|
# 送信先アドレス
|
@@ -147,7 +156,46 @@
|
|
147
156
|
|
148
157
|
html
|
149
158
|
|
159
|
+
index.html
|
160
|
+
|
161
|
+
<!DOCTYPE html>
|
162
|
+
<html>
|
163
|
+
<head>
|
164
|
+
|
165
|
+
<meta charset="utf-8">
|
166
|
+
<title> </title>
|
167
|
+
|
168
|
+
</head>
|
169
|
+
|
170
|
+
<body>
|
171
|
+
|
172
|
+
<div id="headerLogo">
|
173
|
+
|
174
|
+
<a href="../index.html"><div id="kjsLogo"><img src="../images/kjslogo.png" alt="カトウジュニアスポーツロゴ" width="80px" /></div></a>
|
175
|
+
<div id="kjsNameLogo">
|
176
|
+
<a href="../index.html"><p><img src="../images/kjs-name-eigo.png" width="300px" /></p>
|
177
|
+
<p><img src="../images/kjs-name-katakana.png" width="300px" height="22px" /></div></a>
|
178
|
+
</p>
|
179
|
+
</div>
|
180
|
+
|
181
|
+
<div>
|
182
|
+
|
183
|
+
<nav id="annai-left">
|
184
|
+
<h1>お問い合わせ</h1>
|
185
|
+
<p> のホームページにアクセスありがとうございます。<br>お問い合わせいただきました件につきましては、原則メールにて回答申し上げます。<br>尚、お電話での回答をご希望の方は、電話番号のご入力をお願いいたします。</p>
|
186
|
+
<p>よろしくお願いいたします。</p>
|
187
|
+
</nav>
|
188
|
+
|
189
|
+
<nav id="annai-right">
|
190
|
+
<p>電話でのお問い合わせ</p>
|
191
|
+
<p id="phone">8</p>
|
192
|
+
<p>FAXでのお問い合わせ</p>
|
193
|
+
<p id="fax">3</p>
|
194
|
+
<p>受付時間 平日9時~17時30分</p>
|
195
|
+
</nav>
|
196
|
+
</div>
|
197
|
+
|
150
|
-
|
198
|
+
<form action="sample.php" method="post">
|
151
199
|
<table id="otoiawaseform" cellspacing="0" cellpadding="20" >
|
152
200
|
<tr>
|
153
201
|
<th>お名前 <span class="hissu">(必須)</span></th>
|
@@ -194,6 +242,101 @@
|
|
194
242
|
<a href="../index.html #sec0" ><p id="return-top">メインページに戻る</p></a>
|
195
243
|
</body>
|
196
244
|
</html>
|
245
|
+
|
246
|
+
tmpl/comf.tmpl
|
247
|
+
|
248
|
+
<!doctypr html>
|
249
|
+
<html>
|
250
|
+
<head>
|
251
|
+
<meta charset="utf-8">
|
252
|
+
<style type="text/css">
|
253
|
+
<!--
|
254
|
+
span { color:green; }
|
255
|
+
-->
|
256
|
+
</style>
|
257
|
+
<title>確認フォーム</title>
|
258
|
+
</head>
|
259
|
+
<body>
|
260
|
+
<p>次の内容でよろしければ、送信ボタンを押してください。</p>
|
261
|
+
<p>
|
262
|
+
■お名前 : <span>!name!</span>
|
263
|
+
</p>
|
264
|
+
<p>
|
265
|
+
■メールアドレス : <span>!email!</span>
|
266
|
+
</p>
|
267
|
+
<p>
|
268
|
+
■電話番号 : <span>!tel!</span>
|
269
|
+
</p>
|
270
|
+
<p>
|
271
|
+
■郵便番号 : <span>!zipcode!</span>
|
272
|
+
</p>
|
273
|
+
<p>
|
274
|
+
■住所: <span>!address!</span>
|
275
|
+
</p>
|
276
|
+
<p>
|
277
|
+
■お客様の属性 : <span>!attribute!</span>
|
278
|
+
</p>
|
279
|
+
<p>
|
280
|
+
■コメント : <span>!comment!</span>
|
281
|
+
</p>
|
282
|
+
<form action="form.php" method="post">
|
283
|
+
<input type="hidden" name="mode" value="send">
|
284
|
+
<input type="hidden" name="name" value="!name!">
|
285
|
+
<input type="hidden" name="email" value="!email!">
|
286
|
+
<input type="hidden" name="tel" value="!tel!">
|
287
|
+
<input type="hidden" name="zipcode" value="!zipcode!">
|
288
|
+
<input type="hidden" name="address" value="!address!">
|
289
|
+
<input type="hidden" name="attribute" value="!attribute!">
|
290
|
+
<input type="hidden" name="comment" value="!comment!">
|
291
|
+
<input type="button" value="前に戻る" onclick="history.back()">
|
292
|
+
<input type="submit" value="送信する">
|
293
|
+
</form>
|
294
|
+
</body>
|
295
|
+
</html>
|
296
|
+
|
297
|
+
tmpl/error.tmpl
|
298
|
+
|
299
|
+
<!doctype html>
|
300
|
+
<html>
|
301
|
+
<head>
|
302
|
+
<meta charset="utf-8">
|
303
|
+
<style type="text/css">
|
304
|
+
p.msg{
|
305
|
+
color:red;
|
306
|
+
}
|
307
|
+
</style>
|
308
|
+
<title>エラー</title>
|
309
|
+
</head>
|
310
|
+
<body>
|
311
|
+
|
312
|
+
<p><b>エラーが発生しました。</b></p>
|
313
|
+
<p class="msg">!message!</p>
|
314
|
+
|
315
|
+
<form>
|
316
|
+
<input type="button" value="前画面に戻る" onclick="history.back()">
|
317
|
+
</form>
|
318
|
+
|
319
|
+
</body>
|
320
|
+
</html>
|
321
|
+
|
322
|
+
tmpl/send.tmpl
|
323
|
+
|
324
|
+
<!doctype html>
|
325
|
+
<html>
|
326
|
+
<head>
|
327
|
+
<meta charset="utf-8">
|
328
|
+
<title>送信完了</title>
|
329
|
+
</head>
|
330
|
+
<body>
|
331
|
+
|
332
|
+
<p>ありがとうございました。</p>
|
333
|
+
<form>
|
334
|
+
<input type="button" value="トップへ戻る" onclick="location.href='!top!';">
|
335
|
+
</form>
|
336
|
+
|
337
|
+
</body>
|
338
|
+
</html>
|
339
|
+
|
197
340
|
```
|
198
341
|
|
199
342
|
### 試したこと
|