回答編集履歴
4
修正
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
<!-- 各種入力フォーム -->
|
32
32
|
|
33
|
-
<form action="" method="post">
|
33
|
+
<form action="<?= $_SERVER['REQUEST_URI'] ?>" method="post">
|
34
34
|
|
35
35
|
<input type="text" name="created_at_date">
|
36
36
|
|
@@ -50,13 +50,17 @@
|
|
50
50
|
|
51
51
|
<?php
|
52
52
|
|
53
|
-
|
53
|
+
|
54
54
|
|
55
55
|
$submit=filter_input(INPUT_POST,'submit');
|
56
56
|
|
57
57
|
|
58
58
|
|
59
59
|
if ( isset($submit) ) {
|
60
|
+
|
61
|
+
// ボタンが押されたら実行したい処理
|
62
|
+
|
63
|
+
//echo "ボタン押したよ";
|
60
64
|
|
61
65
|
include('sendmail.php');
|
62
66
|
|
3
修正
test
CHANGED
@@ -58,29 +58,7 @@
|
|
58
58
|
|
59
59
|
if ( isset($submit) ) {
|
60
60
|
|
61
|
-
|
61
|
+
include('sendmail.php');
|
62
|
-
|
63
|
-
$db = pg_connect("host='localhost' dbname='hoge' user='hoge' password='hoge'");
|
64
|
-
|
65
|
-
if(!$db){
|
66
|
-
|
67
|
-
print "DBへの接続に失敗しました!\n";
|
68
|
-
|
69
|
-
exit;
|
70
|
-
|
71
|
-
}
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
$created_at_date = $_POST["created_at_date"];
|
76
|
-
|
77
|
-
$form_kind = $_POST["form_kind"];
|
78
|
-
|
79
|
-
$seat_kind = $_POST["seat_kind"];
|
80
|
-
|
81
|
-
$facility_name = $_POST["facility_name"];
|
82
|
-
|
83
|
-
// 以下省略
|
84
62
|
|
85
63
|
}
|
86
64
|
|
2
修正
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
<form action="" method="post">
|
34
34
|
|
35
|
-
<inpu
|
35
|
+
<input type="text" name="created_at_date">
|
36
36
|
|
37
37
|
・・・・
|
38
38
|
|
1
追記
test
CHANGED
@@ -23,3 +23,67 @@
|
|
23
23
|
}
|
24
24
|
|
25
25
|
```
|
26
|
+
|
27
|
+
まとめるとこんな感じでしょうか?
|
28
|
+
|
29
|
+
```php
|
30
|
+
|
31
|
+
<!-- 各種入力フォーム -->
|
32
|
+
|
33
|
+
<form action="" method="post">
|
34
|
+
|
35
|
+
<inpuy type="text" name="created_at_date">
|
36
|
+
|
37
|
+
・・・・
|
38
|
+
|
39
|
+
・・・・
|
40
|
+
|
41
|
+
・・
|
42
|
+
|
43
|
+
<input type="submit" name="submit" value="送信">
|
44
|
+
|
45
|
+
</form>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
<?php
|
52
|
+
|
53
|
+
// ボタンが押されたら実行したい処理
|
54
|
+
|
55
|
+
$submit=filter_input(INPUT_POST,'submit');
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
if ( isset($submit) ) {
|
60
|
+
|
61
|
+
// DB接続&insertなど
|
62
|
+
|
63
|
+
$db = pg_connect("host='localhost' dbname='hoge' user='hoge' password='hoge'");
|
64
|
+
|
65
|
+
if(!$db){
|
66
|
+
|
67
|
+
print "DBへの接続に失敗しました!\n";
|
68
|
+
|
69
|
+
exit;
|
70
|
+
|
71
|
+
}
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
$created_at_date = $_POST["created_at_date"];
|
76
|
+
|
77
|
+
$form_kind = $_POST["form_kind"];
|
78
|
+
|
79
|
+
$seat_kind = $_POST["seat_kind"];
|
80
|
+
|
81
|
+
$facility_name = $_POST["facility_name"];
|
82
|
+
|
83
|
+
// 以下省略
|
84
|
+
|
85
|
+
}
|
86
|
+
|
87
|
+
?>
|
88
|
+
|
89
|
+
```
|