質問編集履歴
4
\$data = mysqli_fetch_assoc\(\$recordSet\);が必要なかったので削除
title
CHANGED
File without changes
|
body
CHANGED
@@ -37,13 +37,12 @@
|
|
37
37
|
mysqli_real_escape_string($db, $id)
|
38
38
|
);
|
39
39
|
$recordSet = mysqli_query($db, $sql);
|
40
|
-
$data = mysqli_fetch_assoc($recordSet);
|
41
40
|
?>
|
42
41
|
|
43
42
|
<select name="information">
|
44
43
|
<?php
|
45
|
-
while($
|
44
|
+
while($data = mysqli_fetch_assoc($recordSet)) {
|
46
|
-
print '<option value="' . htmlspecialchars($
|
45
|
+
print '<option value="' . htmlspecialchars($data['photo'], ENT_QUOTES) . '">' . htmlspecialchars($data['photo'], ENT_QUOTES) . '</option>' . PHP_EOL;
|
47
46
|
}
|
48
47
|
?>
|
49
48
|
</select>
|
3
selectの\*を詳細に
title
CHANGED
File without changes
|
body
CHANGED
@@ -33,7 +33,7 @@
|
|
33
33
|
<?php
|
34
34
|
require('dbconnect.php');
|
35
35
|
$id = $_REQUEST['id'];
|
36
|
-
$sql = sprintf("SELECT
|
36
|
+
$sql = sprintf("SELECT name, age, phone, address, info FROM staff WHERE id=%d",
|
37
37
|
mysqli_real_escape_string($db, $id)
|
38
38
|
);
|
39
39
|
$recordSet = mysqli_query($db, $sql);
|
2
sqlをsqliに統一
title
CHANGED
File without changes
|
body
CHANGED
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
<select name="information">
|
44
44
|
<?php
|
45
|
-
while($data2 =
|
45
|
+
while($data2 = mysqli_fetch_assoc($recordSet)) {
|
46
46
|
print '<option value="' . htmlspecialchars($data2['photo'], ENT_QUOTES) . '">' . htmlspecialchars($data2['photo'], ENT_QUOTES) . '</option>' . PHP_EOL;
|
47
47
|
}
|
48
48
|
?>
|
1
<select name="photo">を<select name="information">に修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -40,7 +40,7 @@
|
|
40
40
|
$data = mysqli_fetch_assoc($recordSet);
|
41
41
|
?>
|
42
42
|
|
43
|
-
<select name="
|
43
|
+
<select name="information">
|
44
44
|
<?php
|
45
45
|
while($data2 = mysql_fetch_assoc($recordSet)) {
|
46
46
|
print '<option value="' . htmlspecialchars($data2['photo'], ENT_QUOTES) . '">' . htmlspecialchars($data2['photo'], ENT_QUOTES) . '</option>' . PHP_EOL;
|