質問編集履歴

1

コード再掲

2018/07/18 01:32

投稿

uep3vjz9wp
uep3vjz9wp

スコア20

test CHANGED
File without changes
test CHANGED
@@ -28,18 +28,32 @@
28
28
 
29
29
  ```php
30
30
 
31
+ <!DOCTYPE html>
32
+
33
+ <html lang="ja">
34
+
35
+ <head>
36
+
37
+ <meta http-equiv="refresh" content="180" >
38
+
39
+ <meta charset="UTF-8">
40
+
41
+ <title>問い合わせ一覧</title>
42
+
43
+ </head>
44
+
45
+ <body>
46
+
47
+ <h3>一覧</h3>
48
+
31
49
  <?php
32
50
 
33
51
  // エラーを出力する
34
52
 
35
53
  ini_set('display_errors', "On");
36
54
 
37
-
38
-
39
55
  require_once 'toidb_config.php';
40
56
 
41
-
42
-
43
57
  try {
44
58
 
45
59
  $dbh = new PDO("mysql:host=localhost;dbname=$databasename;charset=utf8", $user, $pass);
@@ -80,12 +94,148 @@
80
94
 
81
95
        //以下動作せず
82
96
 
83
-
84
-
85
97
  echo "<td>" date("Y-m-d",strtotime(htmlspecialchars($row['toiday'],ENT_QUOTES,'UTF-8') . "+14 day")) "</td>\n";
86
98
 
87
99
 
88
100
 
89
101
 
90
102
 
103
+
104
+
105
+ echo "<td>\n";
106
+
107
+ echo "|<a href=edit.php?id=" . htmlspecialchars($row['id'],ENT_QUOTES,'UTF-8') . ">変更</a>\n";
108
+
109
+ echo "|<a href=predelete.php?id=" . htmlspecialchars($row['id'],ENT_QUOTES,'UTF-8') . ">削除</a>\n";
110
+
111
+ echo "</td>\n";
112
+
113
+
114
+
115
+
116
+
117
+ echo "</tr>\n";
118
+
119
+ }
120
+
121
+ echo "</table>\n";
122
+
123
+ $dbh = null;
124
+
125
+
126
+
127
+ } catch (PDOException $e) {
128
+
129
+ echo "エラー発生: " . htmlspecialchars($e->getMessage(), ENT_QUOTES, 'UTF-8') . "<br>";
130
+
131
+ die();
132
+
133
+ }
134
+
135
+
136
+
137
+ ?>
138
+
139
+ <h3>
140
+
141
+ <table width=100%>
142
+
143
+ <tr>
144
+
145
+ <th>
146
+
147
+ <div align="left"><a href="form.html">問い合わせ新規登録</a></div>
148
+
149
+ </th>
150
+
151
+ <th>
152
+
153
+ <FORM>
154
+
155
+ <INPUT TYPE="button" VALUE="更 新" onClick="window.location.reload();">
156
+
157
+ </FORM>
158
+
159
+ </th>
160
+
161
+ <th>
162
+
163
+ <a href="sonota.php">その他</a>
164
+
165
+ </th>
166
+
167
+ <th>
168
+
169
+ <a href="kiken.php">1番</a>
170
+
171
+ </th>
172
+
173
+ <th>
174
+
175
+ <a href="setsubi.php">2番</a>
176
+
177
+ </th>
178
+
179
+ <th>
180
+
181
+ <a href="boukan.php">3番</a>
182
+
183
+ </th>
184
+
185
+ <th>
186
+
187
+ <div align="right"><a href="prebackup.html">バックアップ</a></div>
188
+
189
+ </th>
190
+
191
+ </tr>
192
+
193
+ <table>
194
+
195
+ </h3>
196
+
197
+
198
+
199
+ <form action = "box_kensaku.php" method="post">
200
+
201
+ <input type="text" name="kenid">
202
+
203
+ <input type="submit" name="exec" value="検索">
204
+
205
+ </form>
206
+
207
+
208
+
209
+
210
+
211
+
212
+
213
+ <!---- フッター ---->
214
+
215
+ <div id="footer"
216
+
217
+ style="width:1px; height:1px;">
218
+
219
+ </div>
220
+
221
+
222
+
223
+ <!---- JavaScript フッタを入れフッタまで強制スクロール ---->
224
+
225
+ <script type="text/javascript">
226
+
227
+ var to = document.getElementById("footer").offsetTop;
228
+
229
+ window.scrollTo( 0, to );
230
+
231
+ </script>
232
+
233
+
234
+
235
+ </body>
236
+
237
+ </html>
238
+
239
+
240
+
91
241
  ```