为什么总是出现未定义索引怎么解决呀
问题描述
<?php
include("connect/connect.php");
$xh=$_GET['xh'];
$sql="select xh,xm,xb,zymc from xsjbxxb where xh=".$xh;/lect host,user from user
$result=mysqli_query($conn,$sql);
while( $arr=mysqli_fetch_array($result) )
{
?>
<form id="form1" method="post" action="update_ok_1.php">
<table border="1" width="400" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100">学号:</td>
<td><input type="text" name="xh" value="<?php echo $arr[0]; ?>"readonly></input></td>
</tr>
<tr>
<td>姓名:</td>
<td><?php echo $arr[1]; ?></td>
</tr>
<tr>
<td>性别:</td>
<td><?php echo $arr[2]; ?></td>
</tr>
<tr>
<td>专业名称:</td>
<td>
<?php echo $arr[3]; ?>
</td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="sub1" value="添加">
<input type="reset" name="sub2" value="清空">
</td>
</tr>
<?php
}
?>
</form>
</table>
</body>
问题解答
回答1:xh字段是主键吗?
相关文章:
1. 前端 - 类到底该如何去命名 .newsList 这种的命名难道真的不是过度语义化吗?~2. docker内创建jenkins访问另一个容器下的服务器问题3. macos - mac下docker如何设置代理4. javascript - if(input.type==’text’&&type != ’text’){return false;}这是什么意思?5. 利用百度地图API定位及附件商家信息服务6. javascript - 求助这种功能有什么好点的插件?7. docker gitlab 如何git clone?8. javascript - weex和node,js到底是怎样一个关系呢?9. python - 字符串里的u’u00a1’怎么打印成中文10. 编辑管理员信息时,为什么没有修改过的内容会为空?

网公网安备