dqx13503925528
2014-10-05 00:08
浏览 237
已采纳

注意:未定义的索引:第3行的C:\ xampp \ htdocs \ libsys \ edit.php中的id

I know this is a newbie question but this error keeps bugging me for a while now please help ty

<?PHP
include "configdb.php";
$id = $_POST['id'];

if (isset($id))
{
    $newName = $id;
    $sql = 'SELECT * FROM booklist WHERE id = $id';
    $res = mysqli_query($connect, $sql) or die("Could not update".mysql_error());
    $row = mysqli_fetch_row($res);
    $id = $row[0];
    $title = $row[1];
    $author = $row[2];
    $ISBN = $row[3];
    $category = $row[4];
    $image_upload = $row[5];
    $image_upload2 = $row[6];

}
?>

图片转代码服务由CSDN问答提供 功能建议

我知道这是一个新手问题,但是这个错误一直困扰着我一段时间请帮助ty </ p>

 &lt;?PHP 
include“configdb.php”; 
 $ id = $ _POST ['id']; 
 
if(isset($ id))
 
 \  n $ newName = $ id; 
 $ sql ='SELECT * FROM booklist WHERE id = $ id'; 
 $ res = mysqli_query($ connect,$ sql)或die(“无法更新”.mysql_error())  ; 
 $ row = mysqli_fetch_row($ res); 
 $ id = $ row [0]; 
 $ title = $ row [1]; 
 $ author = $ row [2]; 
 $ ISBN =  $ row [3]; 
 $ category = $ row [4]; 
 $ image_upload = $ row [5]; 
 $ image_upload2 = $ row [6]; 
 
} 
?n&gt; \  n </ code> </ pre> 
 </ div>

2条回答 默认 最新

相关推荐 更多相似问题