為什么總是出現(xiàn)未定義索引怎么解決呀
問題描述
<?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">學(xué)號(hào):</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>專業(yè)名稱:</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字段是主鍵嗎?
相關(guān)文章:
1. docker內(nèi)創(chuàng)建jenkins訪問另一個(gè)容器下的服務(wù)器問題2. Docker for Mac 創(chuàng)建的dnsmasq容器連不上/不工作的問題3. docker - 各位電腦上有多少個(gè)容器啊?容器一多,自己都搞混了,咋辦呢?4. dockerfile - [docker build image失敗- npm install]5. javascript - vue使用videojs+videojs-contrib-hls報(bào)錯(cuò)6. golang - 用IDE看docker源碼時(shí)的小問題7. 關(guān)docker hub上有些鏡像的tag被標(biāo)記““This image has vulnerabilities””8. mysql如何配置遠(yuǎn)程php外網(wǎng)鏈接數(shù)據(jù)庫9. nignx - docker內(nèi)nginx 80端口被占用10. javascript - 求救!網(wǎng)頁播放視頻只有聲音沒有畫面,網(wǎng)頁上傳視頻文件時(shí)怎么知道視頻的編碼為H264還是MPEG4??
