質問編集履歴
2
コードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -46,7 +46,7 @@
|
|
46
46
|
|
47
47
|
```ここに言語を入力
|
48
48
|
|
49
|
-
if(empty($hoge1 && empty($hoge2) && empty($hoge3)){ // 初期状態を空白
|
49
|
+
if(empty($hoge1) && empty($hoge2) && empty($hoge3)){ // 初期状態を空白
|
50
50
|
|
51
51
|
$sql = $pdo->query('SELECT * FROM items where id=0');
|
52
52
|
|
@@ -115,3 +115,57 @@
|
|
115
115
|
</tbody>
|
116
116
|
|
117
117
|
```
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
```ここに言語を入力
|
122
|
+
|
123
|
+
<form method = "post" action = "hogehoge.php" name="test">
|
124
|
+
|
125
|
+
<div class="form-group">
|
126
|
+
|
127
|
+
<div class="row">
|
128
|
+
|
129
|
+
<div class="col-4">
|
130
|
+
|
131
|
+
<label for="number" class="control-label">商品番号:</label>
|
132
|
+
|
133
|
+
<input type="number" class="form-control" id="number" name="number" value="">
|
134
|
+
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="col-4">
|
138
|
+
|
139
|
+
<label for = "name" class = "control-label">商品名:</label>
|
140
|
+
|
141
|
+
<input type = "text" class = "form-control" id = "name" name = "name" value="">
|
142
|
+
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<div class="col-4">
|
146
|
+
|
147
|
+
<label for = "date" class = "control-label">入荷日:</label>
|
148
|
+
|
149
|
+
<!-- input="date"でカレンダー表示 -->
|
150
|
+
|
151
|
+
<input type="date" class="form-control" id="date" name="date" placeholder="年/月/日" value="">
|
152
|
+
|
153
|
+
</div>
|
154
|
+
|
155
|
+
</div>
|
156
|
+
|
157
|
+
<!-- 2-1:クリア処理 ボタン:「クリア」・「検索」-->
|
158
|
+
|
159
|
+
<div class="form-group text-right mt-3">
|
160
|
+
|
161
|
+
<button class="btn btn-warning btn-sm" type="reset" name="reset" value="clear">クリア</button>
|
162
|
+
|
163
|
+
<button class="btn btn-info btn-sm" type="serch">検索</button>
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
</div>
|
168
|
+
|
169
|
+
</form>
|
170
|
+
|
171
|
+
```
|
1
「empty($hoge1) &&」の部分は転記ミスです、すみません。
test
CHANGED
File without changes
|
test
CHANGED
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
$hoge3 = $_POST['date']??''; // 入荷日
|
14
14
|
|
15
|
-
if(empty($hoge1 && empty($hoge2) && empty($hoge3)){ // 初期状態を空白
|
15
|
+
if(empty($hoge1) && empty($hoge2) && empty($hoge3)){ // 初期状態を空白
|
16
16
|
|
17
17
|
$sql = $pdo->query('SELECT * FROM items where id=0');
|
18
18
|
|