为什么总是出现未定义索引怎么解决呀
问题描述
<?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. ddos - apache日志很多其它网址,什么情况?2. boot2docker无法启动3. css - weui 用伪元素生成border,源码有点不理解4. java - list<Map<String, Object>> 排序5. javascript - 关于audio标签暂停的问题6. javascript - 调微信分享朋友接口,出现下面问题,求解答,7. webpack - vue-cli写的项目(本地跑没有问题),准备放到Nginx服务器上,有什么配置需要改的?还有怎么部署?8. 微信公众号发送模板消息返回错误410009. 这是什么情况???10. 问题Unknown column ’’ in ’where clause’
