【发布时间】:2019-02-21 04:51:28
【问题描述】:
在输入类型文本中,我只得到一个字符串。例如,如果数据库名称字段中有“abc xyz”。所以它只显示 abc 而不是全名这发生在所有字段中。也请检查我的代码。
while($row = mysqli_fetch_array($result))
{
//print_r($row['name']);
echo "<tr>";
echo "<td> ". $row['id'] . "</td>";
echo "<td> <input type=text placeholder = name onchange= nameValidation(this) value = ".$row["name"]." disabled> </td>";
echo "<td> <input type='email' placeholder = 'email' value = ". $row['email'] ." onchange= nameValidation(this) disabled> </td>";
echo '<td> <input type="button" value="edit" onclick="edit(this)">
<input type="button" value="update" onclick="update(this)" style="display:none;">
<input type="button" value="Delete" onclick="delete1(this)" style="display:none;">
</td>';
echo "</tr>";
}
echo "</table>";
【问题讨论】: