为什么总是出现未定义索引怎么解决呀
手机用户1606464442
手机用户1606464442 2020-11-27 16:19:23
[PHP讨论组]
<?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="添加">&nbsp;&nbsp;
				<input type="reset" name="sub2" value="清空">
			</td>
			</tr>
		
	<?php
	}
		?>
		</form>
	</table>
</body>

手机用户1606464442
手机用户1606464442

全部回复(1)
天蓬老师

xh字段是主键吗?

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号